26
1. 2. 3. 1. 2. Publishing to the App Store A Guide to Distributing Xamarin.iOS Applications Overview In order distribute applications to all iOS devices, Apple requires apps to be published through the iTunes App Store. This makes the iTunes App Store the one-stop shopping location for iOS applications, as you are probably well aware. With over 500,000 applications in the store, developers of many types of applications have been able to capitalize on the massive success of this single point of distribution. The App Store is a turnkey solution, offering app developers both distribution and payment systems. The process of submitting an application to the App Store involves: Creating a Distribution Provisioning Profile. Using this profile to build your application. Submitting your application through iTunes Connect. In this article we will cover all the steps needed to provision, build, and submit an application for App Store distribution. Before you Submit The first thing that happens to your application after you submit it for publication to the App Store is for it to go through a review process by Apple to insure it meets Apple’s guidelines for quality and content. If your application fails to meet these guidelines, Apple will reject it, at which time you will need to address the non-conformance cited by Apple, and then resubmit. Therefore, you stand the best chance of making it through Apple review by familiarizing yourself with these guidelines and trying to adapt your application to them. Apple’s guidelines are available at: https://developer.apple.com/appstore/resources/approval/guidelines.html. A couple things to watch out for when submitting an app are: Make sure the application’s description matches the functionality included in the app. Test that the application doesn’t crash under normal usage. This includes usage on every device you support. Apple also maintains a list of App Store submission tips. You can read these at https://developer.apple.com/appstore/resources/submission/tips.html. Additionally, to help with beta testing, Xamarin Studio provides integrated support for TestFlight. For information about how to use TestFlight, see testflightapp.com and http://docs.xamarin.com/ios/tutorials/TestFlight_Support. Building for App Store Distribution In order to publish an application to the App Store, you first need to build it for distribution. Building for distribution involves creating a distribution provisioning profile and then using that to create a

App Store Tips

Embed Size (px)

DESCRIPTION

Según hemos visto a lo largo del documento, el principal beneficio de SOAP recae en ser fuertemente acoplado, lo que permite poder ser testado y depurado antes de poner en marcha la aplicación.

Citation preview

Page 1: App Store Tips

1.2.3.

1.2.

Publishing to the App Store A Guide to Distributing Xamarin.iOS Applications Overview In order distribute applications to all iOS devices, Apple requires apps to be published through the iTunes App Store. This makes the iTunes App Store the one-stop shopping location for iOSapplications, as you are probably well aware. With over 500,000 applications in the store, developersof many types of applications have been able to capitalize on the massive success of this singlepoint of distribution. The App Store is a turnkey solution, offering app developers both distributionand payment systems. The process of submitting an application to the App Store involves:

Creating a Distribution Provisioning Profile.Using this profile to build your application.Submitting your application through iTunes Connect.

In this article we will cover all the steps needed to provision, build, and submit an application for AppStore distribution. Before you Submit The first thing that happens to your application after you submit it for publication to the App Store isfor it to go through a review process by Apple to insure it meets Apple’s guidelines for quality andcontent. If your application fails to meet these guidelines, Apple will reject it, at which time you willneed to address the non-conformance cited by Apple, and then resubmit. Therefore, you stand thebest chance of making it through Apple review by familiarizing yourself with these guidelines andtrying to adapt your application to them. Apple’s guidelines are available at: https://developer.apple.com/appstore/resources/approval/guidelines.html. A couple things to watch out for when submitting an app are:

Make sure the application’s description matches the functionality included in the app.Test that the application doesn’t crash under normal usage. This includes usage on everydevice you support.

Apple also maintains a list of App Store submission tips. You can read these at https://developer.apple.com/appstore/resources/submission/tips.html. Additionally, to help with beta testing, Xamarin Studio provides integrated support for TestFlight. Forinformation about how to use TestFlight, see testflightapp.com and http://docs.xamarin.com/ios/tutorials/TestFlight_Support. Building for App Store DistributionIn order to publish an application to the App Store, you first need to build it for distribution. Buildingfor distribution involves creating a distribution provisioning profile and then using that to create a

Page 2: App Store Tips

1.

distribution build. Let’s go through all the steps involved to create a distribution build. Creating and Installing a Distribution Profile iOS uses provisioning profiles to control how a particular application build can be deployed. Theseare files that contain information about the certificate used to sign an app, the Application ID, andwhere the app can be installed. For development and ad-hoc distribution, the provisioning profilealso includes the list of allowed devices to which you can deploy the app. However, for App Storedistribution, only certificate and app ID information are included, since the only mechanism for publicdistribution is through the App Store. iOS provisioning profiles are managed through a web-based tool called the iOS Provisioning Portal.To access the portal, log in to the iOS Dev Center at developer.apple.com and click Member Centerfrom the links at the top. The Member Center area looks like this:

For App Store distribution, you need to create an Application ID and a distribution profile for theapplication in the provisioning portal. You’ll associate the distribution profile with the Application IDyou create. Follow these steps to create an Application ID, a distribution profile, and a production certificate:

In the Member Center, select Certificates, Identifiers, and Profiles, then select Identifiers in theleft-hand column under "iOS Apps". This will show a list of all identifiers associated with yourdeveloper or your team account. Click the "+" in the top right to create a new ID.

Page 3: App Store Tips

2. Enter a Description, enabled Services, Prefix/Bundle Seed ID (use the Team Bundle Seed ID),and Suffix/Bundle Identifier, and then click Submit. An example for an application called MonkeySpace is shown below:

Page 4: App Store Tips

Opening the App ID from the list of IDs should bright up the following information:

Page 5: App Store Tips

Next, select Provisioning Profiles in the left-hand pane. This will bring up a list of all theProvisioning profiles associated with your developer account or your team account. Click the"+" in the top right to add a new profile In the first panel, choose App Store under Distribution as as the Type for your ProvisioningProfile:

Page 6: App Store Tips

Next, select the App ID created for this application, and then click Submit:

Select a valid Distribution Certificate:

Page 7: App Store Tips

Finally, name the Profile something that makes sense:

Page 8: App Store Tips

The completed iOS Distribution Provisioning Profile screen for the MonkeySpace app isshown. The completed provisioning profile can be downloaded and installed when it is createdby clicking the download button in the screenshot shown below:

Additionally the profile can be downloaded any time by opening it from the provisioning profilelist:

After your provisioning profile has downloaded, drag-drop the downloaded profile file onto theXcode icon in the Dock to install it.

Page 9: App Store Tips

If you do not yet have a Production Certificate associated with your account, you need togenerate one. Navigate to Certificates, and click the "+" to generate a new Certificate. For the Type, select App Store and Ad Hoc:

The Portal will provide instructions for how to generate a Certificate. Open Keychain Access;from the main menu, choose Certificate Assistant... and Request Certificate from a CertificateAuthority...:

Page 10: App Store Tips

Fill in your information and select the "Saved to disk" option:

Page 11: App Store Tips

Upload the Certificate Signing Request:

Page 12: App Store Tips

Download the Certificate. It will be automatically added to your Keychain:

Page 13: App Store Tips

1.2.3.4.

With the production provisioning profile created and installed, you can now use it to create adistribution build for App Store publication, as shown in the next section. Creating a Distribution Build Configuration Now let’s build a Xamarin.iOS application that can be published to the App Store. First, you’ll need toadd a new build configuration to the Xamarin Studio solution. This new configuration will use thedistribution profile you created and installed in the previous section to sign the application for AppStore distribution. Adding the Build Configuration Follow these steps to create the build configuration:

Double-click on the solution in the Solution Explorer to display the Solution Options dialog.Select Build > Configurations in the left-hand pane.Under the General tab, select Add.In the New Configuration dialog, give the configuration a name, such as AppStore, and thenselect iPhone as the Platform, (iPhone actually means iOS device in this context) as shownbelow:

Page 14: App Store Tips

5.

1.2.

3.4.

Click OK in the Solution Options dialog.

Configuring the Build Configuration for your Application

Back in the Solution Explorer, right-click the project and then select Options.Select Build > iOS Build and then choose the newly created AppStore configuration. Set anyadditional build settings your application may need for the AppStore configuration, such as Additional mtouch arguments, in this dialog:

Select iOS Bundle Signing in the left-hand pane.For the AppStore configuration, set the Identity to Distribution (Automatic) and then select the

Page 15: App Store Tips

5.6.

7.

8.

Provisioning profile you installed earlier, as shown below for the LiveDemo app:

Select iOS Application in the left-hand pane.On the Summary tab, under the iOS Application Target section, set the Application name, Identifier, and the Version and Devices. The Identifier must be the same value that was set forthe Bundle Identifier when you created the provisioning profile, as shown below for theLiveDemo app:

For an application distributed in the App Store, you should also include application icons. Seethe document Working with Images for more information.Click OK in the Project Options dialog.

Page 16: App Store Tips

9.

10.

1.2.

1.2.3.4.

In Xamarin Studio, set the Build Target drop-down list to the newly created AppStore|iPhone configuration in the top toolbar, as shown below:

Select Build > Build All from the main menu to build the application. You should alwaysensure that the application builds without errors before creating an Archive to distribute.

If the application builds successfully you are ready to upload it to the App Store, which is the topic ofthe next section. Publishing your Application to the App Store Applications are published to the App Store by using the iTunes Connect website along with theXcode Archive Tool, which is included with the iOS SDK. iTunes Connect is available at https://itunesconnect.apple.com. Apple offers an integrated build and deployment mechanism in Xcode called Archiving. XamarinStudio 3.0 can integrate with this feature to simplify the deployment process. Some of the advantages of deploying via Build & Archive:

App can be validated before uploading.Crash reports can be symbolicated for that release (if the corresponding Archive has beensaved).

Build & Archive can be used to:

Deploy to the App Store.Build for Ad-hoc Distribution.Build for Enterprise Deployment.Export for later use.

This section is going to explain how to deploy to the App Store using the Xcode Organizer’s Archivefeature. Before starting, you should have a distribution certificate (either Deployment, Enterprise or Ad-hoc)from the iOS Provisioning Portal. Review the document Creating and Installing a Distribution Profile. iTunes Connect

Page 17: App Store Tips

To deploy an application to the App Store, it must be configured in iTunes Connect (if you arebuilding for Ad-hoc or Enterprise deployment this step can be skipped). See the Creating Your AppRecord in iTunes Connect for instructions. Once the application has been set-up, the applicationpage will appear as shown:

Press the Ready to Upload Binary button, and progress through the questions.

The final screen indicates that iTunes Connect is ready for the application bundle to be uploaded.The text on the screen suggests using Application Loader, however the bundle can also be uploadedvia the Archive tool.

Page 18: App Store Tips

When the status is Waiting for Upload the application binary can be deployed via the Archive tool.

The process to deploy an app using the Archive tool is discussed in the following sections. Xamarin Studio A Distribution profile should be used, otherwise the tool can’t sign the code and it will not be able tobe installed onto non-test devices. Xamarin Studio will attempt to choose the correct Provisioning profile based on the Bundle ID andthe developer’s Identity; however you can manually select a specific Provisioning profile via themenu item Project > Options > iPhone Bundle Signing, as shown here:

Page 19: App Store Tips

To archive the current application, select Xamarin Studio’s Build > Archive menu item.

The status bar will display the build progress. When complete, the Archives tab will be displayed. The Archives tab displays a list of archived applications. Click on an app to see application detailsand the individual archives that have been built. Comments can be added to the archive (eg. make anote of why the archive was created, such as for a beta test release, or an App Store productiondeployment). Comments are useful because it is a good idea to keep archives (especially thosereleased to the App Store or an Enterprise deployment) because it will allow you to symbolicate.

Page 20: App Store Tips

Once the archive has been created in Xamarin Studio, switch to Xcode for deployment options. Xcode Organizer Start Xcode and then open the Organizer from the Window menu.

In the Organizer, choose the Archives tab. This screen shows the same list of applications on the leftas the Archives tab in Xamarin Studio, and provides options to validate and distribute an archive:

Page 21: App Store Tips

The following steps apply to both validation and distribution (except where noted). Both buttons starta ‘wizard’ that guides you through the process. The first step is to choose which type of distribution:

Page 22: App Store Tips

For App Store submissions Xcode needs to login to iTunes Connect. Enter your Apple ID andpassword:

Xcode retrieves a list of applications configured in iTunes Connect with a status of ‘Waiting forBinary’. Choose the correct application from the list:

Page 23: App Store Tips

Xcode will then proceed to upload the application:

Validation If you had chosen Validate… then this is the result you hope to see:

Distribution If you are in the process of distributing your app, it will then be uploaded to iTunes Connect:

Once the upload is complete, this message will appear to confirm that the application submission

Page 24: App Store Tips

has been successful and is now in the queue for review:

Now you just wait for Apple’s review team to approve your application and publish it on the AppStore! iTunes Connect If you chose to distribute your app, the status in iTunes Connect should now show that it is Waitingfor Review (it may temporarily read Upload Received while it is processed):

Subsequent versions When new versions of an application are built and archived they will be added to the list in the Archives tab. Adding a comment to each archive will help keep track of what each bundle was for.This screenshot shows the archive tab after a subsequent build has been archived:

Page 25: App Store Tips

It is recommended that archives deployed to customers (either App Store or Enterprisedeployments) are kept, so that any debug information that is generated can be symbolicated at alater date. Errors If there is a problem with the provisioning profiles on your computer the following message willappear during the validation or distribution process. Use the buttons to update your identity andprovisioning profiles, or visit the iOS Provisioning Portal directly to download the correct certificatesand provisioning profiles.

Page 26: App Store Tips

Summary This article presented a step-by-step guide to configuring, building, and submitting an application forApp Store publication. First, it covered the steps needed to create and install a distributionprovisioning profile. Next, it walked through how to use Xamarin Studio to create a distribution build.Finally, it showed you how to use iTunes Connect and the Xcode Archive Tool to submit anapplication to the App Store.