Distributing an iOS app outside of the App Store is a whole lot harder than distributing that same app on Android. Therefore we wrote this manual to guide you briefly through each of the steps involved. Since these steps are very similar to the ones you need to follow to actually publish a Google Cardboard app for iOS in the App Store, you can check out that tutorial for more detailed descriptions if necessary.
The key is that you will need the unique ID numbers, the so called UDID, of all of the iOS devices you want to be able to run your app on outside of the App Store. In the steps below I explain how to find out the UDID and what to do with it to allow your iOS app to be installed on that particular device.
Using Headjack
These are the required steps if you build your app using Headjack:
- Sign up for an Apple Developer account and login
- In the sidebar, click on Certificates, IDs & Profiles, and click the + button to create an App Store and Ad Hoc Certificate
- In the sidebar, click on App IDs, create a Wildcard App ID by clicking the + button followed by selecting Wildcard App ID and filling in an asterisk (*) in the Bundle ID field
- Go to http://whatsmyudid.com/ and follow the instructions to figure out the UDID’s of the iOS devices you want to run your app on
- Back in your Apple Developer account, click on All under Devices in the sidebar, and click on the + button to register a new device by filling in a device name and the UDID you just located
- In the sidebar, click on Distribution under Provisioning Profiles, and then on the + button to add a new Provisioning Profile for Ad Hoc distribution by selecting Ad Hoc and by adding this Ad Hoc profile to the Wildcard App ID you just created
- In the sidebar, click on All under Certificates and create a new certificate by clicking the + button. Then select App Store and Ad Hoc and press Continue. Now follow the on-screen instructions to create your certificate.
- Download and install your newly created Certificate (.cer) file on your Mac
- Open Keychain Access, click login under Keychains header and Certificates under the Category header. Now right-click your certificate, and then click Export. Select Personal Information Exchange (.p12) as file format, then Save. Fill in a password and then click OK. Finally, fill in the password of your Mac, and then click Allow.
- Now login to Headjack and go to Settings > App Signing and click + Add signing files. Fill in a title and then select Cardboard iOS from the dropdown and Store as distribution channel. Finally, upload your .p12 certificate, as well as the Provisioning Profile we created earlier. When done, press Save.
- Go to Apps in the Headjack sidebar, and then open your app. In the top-right Build section, select Cardboard iOS, then Store, and finally select the signing credentials you just uploaded. Fill in your certificate password and click Build.
- Wait 10-40 minutes until your build is finished, and then download your app as a .ipa file.
- Finally, upload your .ipa file to https://www.diawi.com/ or https://betafamily.com/supersend and send the URL they generate to your testers or partners. They can then open this link in Safari on their device to install the app. An alternative to these services is Apple TestFlight, which I’ve personally never used.
Unity or Native
These are the required steps if you build your app natively or with Unity:
- Sign up for an Apple Developer account and login
- In the sidebar, click on Certificates, IDs & Profiles, and click the + button to create an App Store and Ad Hoc Certificate
- In the sidebar, click on All under Certificates and create a new certificate by clicking the + button. Then select App Store and Ad Hoc and press Continue. Now follow the on-screen instructions to create your certificate.
- In the sidebar, click on App IDs, create a Wildcard App ID by clicking the + button followed by selecting Wildcard App ID and filling in an asterisk (*) in the Bundle ID field
- Go to http://whatsmyudid.com/ and follow the instructions to figure out the UDID’s of the iOS devices you want to run your app on
- Back in your Apple Developer account, click on All under Devices in the sidebar, and click on the + button to register a new device by filling in a device name and the UDID you just located
- In the sidebar, click on Distribution under Provisioning Profiles, and then on the + button to add a new Provisioning Profile for Ad Hoc distribution by selecting Ad Hoc and by adding this Ad Hoc profile to the Wildcard App ID you just created
- Export your iOS app as an Xcode project, which is what Headjack will generate for you when you select Local as Distribution Channel and then Cardboard iOS as Platform
- Download and install Xcode on an OSX device and open the Xcode project of your app by clicking the Unity-iPhone.xcodeproj file
- Go to Xcode > Preferences, add your Apple Developer account, click View details and then Download all to import the Certificates and Provisioning Profiles you created earlier
- In the Build Settings tab, navigate to Enable Bitcode under Build Options, and set the value to No to disable Bitcode, else your Xcode project will throw errors when building
- In the Build Settings tab, set all Code Signing Identities to iOS Distribution
- In the General Settings tab, select your iOS Distribution team from the dropdown menu
- Now click Product > Clean and then Product > Archive and wait for the process to complete
- Click Export, then Save for Ad Hoc Deployment and follow the on-screen instructions to generate a .ipa file of your app, which is a compiled version of your app which can be distributed to testers or partners outside of the App Store
- Finally, upload your .ipa file to https://www.diawi.com/ or https://betafamily.com/supersend and send the URL they generate to your testers or partners. They can then open this link in Safari on their device to install the app. An alternative to these services is Apple TestFlight, which I’ve personally never used.
Quite a process, huh?! But once you made it through once, it will be a lot easier the second time around. Just keep in mind that you will only be able to install and run your app on the iOS devices whose UDID you’ve added to your Ad Hoc Provisioning Profile.
If you added the UDID correctly and the app still won’t install on your device, try to re-import all the Certificates and Provisioning Profiles into Xcode as described in step #9, and export the .ipa again.