Nuts and bolts of Mobile App Distribution in iOS
Mobile application distribution is considered one of the crucial factors in evaluating the maturity of any mobile application management strategy, claims Forrester. Case in point, Apple's app development and distribution ecosystem is entrenched in complex processes pertaining to provisioning, entitlements, code signing and other activities which are enforced strictly. The intricacies associated with distributing an app product on the Apple store is a study in itself that demands extensive insight as we shall discover in this post.
Relative to Android apps on Google Play ecosystem, packaging and distributing an iOS app has numerous details that can easily be overlooked, which could lead to challenges at the final stages of development. So much so that it has emerged as a major driving factor for the app makers that warrant the formulating of an efficient distribution process best suited to their needs.
In his post we use an example of how Lister manages distribution of mobile apps for Enterprise Clients like Rosetta Stone, to arrive at a detailed and clearer understanding on how to deal with the distribution of iOS Apps on the Apple ecosystem.
The distribution modes provided by Apple are,
- Ad Hoc Distribution
- Enterprise Distribution
Ad Hoc Distribution
Ad hoc distribution is a distribution provisioning profile that allows an app to be installed on designated devices and enables usage of the app services without the assistance of Xcode. Below are some of the important working steps in Ad Hoc distribution.
- Purchase Developer License: An Apple Developer Company Program license is the first requirement. The license costs around $99 per year and grants access to the Member Center that helps manage all aspects of the App Distribution
- Create an App ID: Every app requires a unique identifier called the App ID (or bundle identifier). This can be created in the Member Center
- App Store set up: With this, you will also be able to configure your app on iTunes Connect which is referred to as the App Store
- Define Entitlements: If an app is meant to use specific app services like iCloud, Push Notifications, In-App Purchases etc. these services need to be enabled against the relevant App ID. Ensure that this ID matches the one created on the Developer Portal. These 'entitlements' as they are referred to in the Apple ecosystem are a set of permissions for the app to perform certain operations. A few services require additional configuration to be made which can be found here.
- Manage Test Devices: Add test devices in the Member Center so that the app can be installed on these provisioned devices. Apple sets a limitation on the number of devices that can be registered every year - 100 per membership year. One thing to note is that the device count gets reset only during the annual renewal and hence removing devices during the year will continue to count against the device limit - See more at: http://www.listertechnologies.com/blog/nuts-and-bolts-mobile-app-distrib...
- Generate Code Signing: By code signing, Apple verifies that the app has the required permissions to use certain services and allows installation only on designated devices. For this, create an ad hoc distribution provisioning profile linked with a distribution certificate which should be used while packaging the app. Read Apple's guidelines about code signing & certificates.
Ad Hoc Distribution is ideal as long your development and testing confines to the set of devices previously registered. An Ad Hoc package can be considered an exact replica of the app store package running on a sandbox environment. All of the entitlements remain unchanged and the app store equivalent can be packaged using the app store distribution profile and certificate from the Apple Developer Company Program.
Limitation of Ad Hoc Distribution: Ad Hoc distribution can have limitations most prominently in the cases where suites of mobile products require development, testing and distribution at an organizational level. Every time you have new devices to be provisioned - you should register the device, create a new code signing identity, repackage the app and distribute it again.
Apple's perception of Enterprise distribution is that the app would be intended for in-house distribution solely, such as designed only for the employees within the organization. This could easily be leveraged to fit the case of distributing apps amongst a group of cross located developers and testers. For example, a sales enablement tool used by sales teams within the organization is not available in the app store.
Enterprise distribution has similar working steps as that of Ad Hoc with a few differences,
- Purchase Enterprise License: Purchase an Apple Developer Enterprise Program license that costs around $299 per year. This grants access to the Member Center of the Enterprise Program to create app identifiers
- Create an App ID: When it comes to creating App IDs, apps can either have a unique App ID or wildcard app IDs that can be used for a set of apps developed within an organization
- App Store set up: A key difference here is that this license does not come associated with iTunes Connect for the obvious reason that Enterprise apps are not meant to be distributed via the App Store
- Define Entitlements: They work the same way here like Ad Hoc. Required services can be enabled on the unique App ID. A key point to remember is that wildcard app IDs, do not work with certain services such as Push Notifications, Apple Pay, In-App Purchase cannot be enabled
- Manage Test Devices: Add test devices and make use of the development code signing from the Enterprise Program. This will set the device restriction on development builds just like the Ad Hoc mode
- Generate Code Signing: Create and use the distribution provisioning profile and a distribution certificate to package the app. Using the distribution code signing is the primary factor that removes the device restriction and allows installation on all devices
Enterprise distribution with a combination of wildcard app IDs can be really convenient while working on a set of mobile products and can easily be distributed across with no device restrictions
Limitation of Enterprise distribution:
Certain capabilities that are strongly linked with the iTunes Connect like In-App Purchases cannot work on Enterprise builds. In such cases, it is required to have a separate app ID configured for Ad Hoc distribution along with a wildcard app ID enabled for Enterprise distribution.
Following is a quick summarization on the distinguishing factors between the two distribution choices
At Lister we chose to use both these distribution modes for all our interim QA releases. Two variants (calling it Alpha and Beta) of the package were generated which enabled the testing of the majority of the features on the Alpha (Enterprise) build with no device restrictions and specific features like In-App Purchases and Push Notifications that could be tested on the Beta (Ad Hoc) variant.
- By Anuradha Nagarajan, Technical Lead
To explore how your mobile app deployment journey can be successful, talk to us!