Reason behind this
There are numerous tutorials teaching you how to create an iOS app, but few of them tell you how to do the test on when users update your apps. We can simulate this by:
- Generate the ipa file
- Install ipa on your device from mac
Part 1: Generate IPA using Xcode:
Step 1: Go
This operation might take a while. Time to get a ☕️~
Before Xcode 12:
Step 3: Select
Ad hoc, and you can also use
Development as long as you have the device id registered in the profile.
iOS App Store can't be used, I̵ ̵g̵u̵e̵s̵s̵ the reason is Apple will put additional encryption on the ipa and verify the certificate. See Part 3.
You can choose App Thinning method or simply just put None:
Normally automatically manage signing will do:
It will take a while to build and compile:
And finally you can click export it to somewhere convenient.
Part 2: Install on mobile
Device and Simulators, select the target ipa you want to install and higher version to simulate the updates.
Part 3: What happened when you download apps from App Store
There are quite a lots of friends asking a similar question whether can they use the above method to install production/release ipa file on their iPhone/iPad.
The answer is no. The error msg you probably see is: “unable to install [your app name]”.
Before dig that reason, so what happened when you download and install Apps from App Store?
There are public key(s) issued by Apple sitting in your iPhone, whenever you download a new app and try to install on the mobile, it will automatically verify the app whether it is from the App Store.
The app downloaded from App store are encrypted.
When you export the ipa from the Xcode (Window → Organizer) using the way of App Store Connect. The ipa is not signed by Apple yet. Apple will sign and encrypt the ipa file when you upload to their server. That is the reason why if you are using the above methods trying to install the production/release ipa on your mobile is not working. As the the key mismatched.
Originally published at needone.app on February 7, 2019.