App Distribution Outside the Apple App Store

Sercan Eraslan
Trendyol Tech
Published in
3 min readOct 2, 2020
Apple Enterprise

For Turkish press 9.

We wanted to distribute the .ipa and .apk files we produced ourselves since our Courier Mobile application is not required to be published on the Apple App Store or Google Play Store and so that only the people we wanted could install the app. When we started searching, we saw that there was no problem in directly distributing the .apk file, but it was not easy to distribute the .ipa files directly.

To distribute the .ipa files yourself, first, you have to join the Apple Developer Enterprise Program with your company information and for this, $299 is required to be paid each year. The approval process can take up to 1 month. After joining the Enterprise Program, the following steps shall be followed;

1) Creating a Distribution Certificate

  1. Open the “Certificates” page: https://developer.apple.com/account/resources/certificates/list
  2. Click the “+” button.
  3. Select “In-House and Ad Hoc” under the “Software” heading.
  4. Click the “Continue” button and follow the instructions to create a Certificate Signing Request (CSR) with Keychain.
  5. Click the “Continue” button and upload to the Member Center.
  6. Click the “Generate” button and create your certificate.

2) Creating a Distribution ID

  1. Open the “Identifiers” page: https://developer.apple.com/account/resources/identifiers/list

2. Click the “+” button.

3. Select “App IDs” and click the “Continue” button.

4. Fill in the “App Name” and “Bundle ID” and then click the “Continue” button.

3) Creating a Distribution Profile

  1. Open the “Profiles” page: https://developer.apple.com/account/resources/profiles/list
  2. Click the “+” button.
  3. Select “Ad Hoc” under the “Distribution” heading.
  4. Click the “Continue” button and select your App ID.
  5. Select the certificate you have already created and available in your Keychain.
  6. Download and open the completed profile.

4) Creating/Serving the .ipa File

  1. From the Xcode menu, click first “Product” and then “Archive”.
  2. Click “Export” after the archive process is completed.
  3. Select “Enterprise” as the distribution method.
  4. After the export is completed, save your .ipa file.
  5. Serve the .ipa file you have created over a server/CDN running with HTTPS.

5) Creating the manifest.plist

1. Create a file named “manifest.plist” as shown in the example below.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>YOUR_IPA_FILE_URL</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>BUNDLE_ID</string>
<key>bundle-version</key>
<string>1</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>APP_NAME</string>
</dict>
</dict>
</array>
</dict>
</plist>

2. Change the YOUR_IPA_FILE_URL, BUNDLE_ID, and APP_NAME fields.

3. Upload your manifest.plist file so that it will be side by side with the .ipa file you have uploaded in the same file structure.

6) Creating the exportOptions.plist

  1. Create a file named “exportOptions.plist” as shown in the example below.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>enterprise</string>
<key>teamID</key>
<string>TEAM_ID</string>
<key>signingStyle</key>
<string>automatic</string>
<key>provisioningProfiles</key>
<dict>
<key>PRODUCTION_BUNDLE_IDENTIFIER</key
<string>PRODUCTION_SCHEME</string
<key>STAGE_BUNDLE_IDENTIFIER</key
<string>STAGE_SCHEME</string>
</dict>
</dict>
</plist>

2) Change the TEAM_ID, PRODUCTION_BUNDLE_IDENTIFIER, PRODUCTION_SCHEME, STAGE_BUNDLE_IDENTIFIER and STAGE_SCHEME fields.

7) Sharing the App Link

If you want to share the App link on a web page and/or in e-mail, you can use the following HTML code or directly send the ‘’itms-services://?action=download-manifest&url=YOUR_MANIFEST_FILE_URL’’ link to the people who will use the app. Don’t forget to replace “YOUR_MANIFEST_FILE_URL” with the link of your manifest.plist file.

<a href="itms-services://?action=download-manifest&url=YOUR_MANIFEST_FILE_URL">Download App</a>

When iOS users open the URL in the browser, ‘’Open this page in iTunes?’’ will be displayed. When you say ‘’yes’’, the application will start to load in the background. After the app is downloaded, tap ‘’Settings > General > Device Management > COMPANY_NAME’’, respectively for once and then ‘’Trust’’. Following this process, your app will be used problem-free.

Conclusion

n the Trendyol GO Project, we wrote a code that automatically conducts the processes specified in the items 4, 5, 6, and 7. Soon we will share open-source codes with which we automated the app distribution.

Edit: We made our codes open source under the name of Mobile App Automizer :) https://github.com/automizer/mobile-app-automizer

Publishing apps outside the App Store is not something that can be experienced very often and since there are not many articles on the internet, we wanted to share it with you, see you in the next post, bye bye :)

--

--