Build iOS app and distribute .ipa via TestFlight with Jenkins and Xcode 7

两盒软妹~` 提交于 2019-11-30 16:25:33
Renaud Tilte

Take a look at this: https://stackoverflow.com/a/32762413/5373468

And if you're not sure it's a bug, you can get a confirmation here too: http://cutting.io/posts/packaging-ios-apps-from-the-command-line/

As of Xcode 7 we should use xcodebuild instead of PackageApplication to produce the .ipa file.

xcodebuild has a new -exportArchive option to create an .ipa that works more like Xcode Organizer.

See answer here for details: iOS builds / ipa creation no longer works from the command line

I fixed the same issue by changing Jenkins build settings: Go to Configure > Advanced Xcode build options and add to Custom xcodebuild arguments

CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist

These two commands have worked perfectly for me:

  1. Create an archive: xcodebuild -workspace "/path/to/something.xcworkspace" -scheme "some enterprise" -configuration Release -CODE_SIGN_IDENTITY="your identity" PROVISIONING_PROFILE="61xyz111-22x0-2345-123x-xyxxxxxx" archive -archivePath "/where/you/want/the/archive/xyz.xcarchive"

  2. Generate IPA: xcodebuild -exportArchive -exportFormat IPA -exportProvisioningProfile "Name of your profile" -archivePath "/where/you/saved/the/archive/xyz.xcarchive" -exportPath "/where/you/want/the/IPA/xyz.ipa"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!