Tuesday, June 13, 2017

Test ios app ipa file using ad hoc provision profile and test fligh

1) Using Ad hoc
When using ad hoc for ios testing, the testing device does not need to install the provision profile, the only thing required from testing device side is adding the device id to the apple developer account device list.

The same certificate used for Apple store distribution can also be used for Ad hoc, so there is no need to create a separate distribution certificate.

1. Add the explicit app id for the testing app in apple developer account
2. create ad hoc provision profile in apple developer account, which associates the appid, and all devices that will be used for ad hoc testing.
3. from xcode project, disable "Automatically manage signing" and set the provision profile to the created one.
4. archive the project
5. export the archive for ad hoc distribution, the ipa file will be created in the output folder.

Note sometimes xcode will generate a generic xcode archive instead of ios archive, most likely that is due to a library project included in the workspace has a header section in build phase, please refer to
https://developer.apple.com/library/content/technotes/tn2215/_index.html#//apple_ref/doc/uid/DTS40011221-CH1-PROJ
for details. To workaround, just remove the library project and direct link to the library's .a file.
In addition, if forgetting to set the app version number will also cause this issue.


2) Using testing flight
When using testing flight, you only need the email of the tester, the device used for testing must use the appid with same email from the tester.

1. build the project and then archive the project. Be sure the certificate and profile are all valid otherwise the app may not install by Test Flight
2. create an app from Apple ITune Connect
3. Upload the Archive from xcode to iTune
4. In ITune, select Test Flight to add the tester with email or add the tester into a group
5. In Test Flight, select Build iOS and make the build ready for testing.
6. select the build for testing and add the tester group or individual tester.

No comments:

Post a Comment