It’s important to initially set, and later update, the version number and build string before you upload or export your app because these numbers are used throughout the system to identify the build. Specifically, the version number and build string are used to identify crash reports and .dSYM
files for apps distributed through TestFlight or the App Store. For iOS apps, iTunes will recognize that the build string changed and properly sync the new app version to the device.
Therefore, set the version number and build string before you create your first archive. Increment the build string before you archive a new build of your app that you intend to upload to iTunes Connect or export for distribution outside the App Store. Then increment the version number when you create a new app version in iTunes Connect.
In the project editor, choose the target and click General.
If necessary, click the disclosure triangle next to Identity to reveal the settings.
Enter the version number in the Version field, and enter the build string in the Build field.