Before Xcode 8.3, can use xcrun PackageApplication to generate IPA, but PackageApplication is removed since Xcode 8.3, so should use another way to generate IPA. This doc will describe how to generate IPA with Xcode 8.3+.

According to the ticket, the new method includes two steps:

  • generate .xcarchive
  • generate IPA from .xcarchive

-exportOptionsPlist is needed when using xcodebuild command to export IPA. The plist file pointed by -exportOptionsPlist can have many keys. Only the key method is needed, teamID don’t have to be set if it is the same as generating .xcarchive.

Can refer to the PR for detail information about how this new method work.