Using -exportArchive instead of Package Application to export an IPA
07 Jan 2016
After upgrading to Xcode 7, my command line build script to build and package ipas started to fail because of this error:
I did some research and learned that my method of exporting the ipa by using xcrun and the PackageApplication script uses –resource-rules and there is no way to get around it without actually updating the script itself. Since that seemed like a terrible way to resolve the issue, I did a little more research and found the proper way of exporting an ipa without using PackageApplication. Here is a before and after look at my build script.
Before: xcrun with PackageApplication
After: xcodebuild with -exportArchive
The -exportArchive method does require a plist file with a few key values. The configuration changes depending on wether it is an enterprise or App Store ipa. This is what the plist files should look like:
App Store plist
This method has been working great so far. Let’s hope it survives the next Xcode upgrade!
Here are links to articles that helped me with this: