Setting project-wide properties

The project settings page allows you to quickly configure the settings for the project—things such as the iOS deployment target. The settings we looked at earlier were specific for each target. This setting allows you to specify the minimum iOS version installed on the device for the application to run. Please note that the minimum requirement to run a Swift application is iOS 7.1; thus, if your application is written with or has a Swift component, setting a value lower than 7.1 will not work and the application will crash on launch.

This also allows you to specify the build type, debug, or release.

Setting project-wide properties

Code signing

After you have finished testing and trying out the various settings, you need to build a binary that you can upload to the App Store. This is where a lot of new newcomers to Xcode get stuck. The general expectation is to receive a binary file that can be uploaded to the App Store. The earlier workflow in Xcode was exactly that simple. Start the build process and, it would compile and generate the final binary. You could pick up the relevant one from either the Debug directory or the Release directory. However, there is no such option available anymore. There is a small trick to it to get a release build for the App Store. I call it a trick because the natural assumption is that, when you compile the code, you will be presented with an end result as per the settings chosen. Perform the following steps:

  1. Ensure that Bundle Identifiers, assets, and so on are all set
  2. Ensure that, under the Build Settings section, under Code Signing, the CODE_SIGN_IDENTITY under Release has iPhone Distribution and the Any iOS SDK has your team ID; if you are compiling for a client, you select their distribution identity and not your own, or vice-versa.
  3. Also ensure that the PROVISIONING_PROFILE setting has the appropriate certificate that you want to use for distributing this application.
  4. Change Destination under Product to iOS Device. The literal value of the iOS device not a connected iOS device or a simulator device.
  5. Now, if you look at the Product menu, there is an option that was disabled earlier and is now enabled. This is the Archive option. Select the Archive option from the menu:
    Code signing
  6. This will compile, code-sign, and create an archive of your application. This archive can be found in Organizer. To display the Organizer window, from the Xcode menu navigate to Window | Organizer.

Organizer

The organizer is the place where you can navigate and find all of your projects and archives. Under the projects, you can find all of the projects that you opened on that machine. You can also create snapshots, a saved version of your code like a versioning system. This is sometimes useful to check and fix bugs if your users provide you with crash reports. The organizer also houses the archives; this is of interest to us as this is how Apple has provided a workflow to upload your application to the App Store.

Organizer

As you can see in the preceding screenshot, there are three projects that have been archived including our sample Project Chapter7. Since there was no icon specified for this, you are seeing the default blank template used for icons. From here, you can run the Validate, Submit, or Export commands. Validate checks for all of the libraries, dependencies including related files, and the certificate used for code signing.

Organizer

This is quite handy as it checks for the preliminary issues that could cause your application to be rejected by Apple. However, this assumes that you have created an entry on the iTunes App Store for your application. Post validation, the application can also be submitted to the App store right from the Organizer window. Once it is uploaded, you wait for Apple to review and approve your application. Once it is approved, you can log into iTunes Connect and make it available for sale (if you set a later date), control the price, and so on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.226.105