xcodebuild different provisioning profile for target dependency

后端 未结 4 1839
醉话见心
醉话见心 2020-11-27 16:19

I\'m trying to build my app with xcodebuild:

xcodebuild -workspace \"RG.xcworkspace\" -scheme \"Production\" -configuration \"Release\" build CONFIGURATION_B         


        
4条回答
  •  庸人自扰
    2020-11-27 16:44

    Solution Without Variable

    There is an option, -exportSigningIdentity which can help you, because provisioning profiles of Application & Extension/Widget may be different, but signing identities of app & extension are supposed to be same.

    For example, you will see that,

    • TargetApp -> Build Settings -> "Code Signing Identity (id)" (Release)
    • TargetExtension -> Build Settings -> "Code Signing Identity (id)" (Release)

    are essentially same string, lets say this identity is "Code Signing Identity (id)". So to build & export archive, what you can run, are simply,

    Cleaning

    xcodebuild clean -workspace HelloWorld.xcworkspace -scheme HelloWorld

    Building

    xcodebuild -workspace HelloWorld.xcworkspace -scheme HelloWorld archive -archivePath ~/output/HelloWorld.xcarchive

    Exporting

    xcodebuild -exportArchive -exportFormat ipa -archivePath ~/output/HelloWorld.xcarchive -exportPath "HelloWorld.ipa" -exportSigningIdentity "Code Signing Identity (id)"

    Reference: xcodebuild documentation

提交回复
热议问题