简体   繁体   中英

xcode 7: Building for enterprise and adhoc with the same archive

Currently using the xcode 6 build process, we first create the xcarchive with the following command

xcodebuild -workspace OurApp.xcworkspace -scheme MainScheme \ 
clean archive -archivePath OurApp.xcarchive -sdk "iphoneos" \ 
-configuration "Release" CODE_SIGNING_REQUIRED="NO" \ 
CODE_SIGN_IDENTITY="" PROVISIONING_PROFILE=""

By not doing any code signing and provisioning, we then use the exportArchive command to generate the respective enterprise and adhoc ipas using the same archive like this.

xcodebuild -exportArchive -archivePath OurApp.xcarchive \
-exportPath OurApp-adhoc.ipa -exportFormat "ipa" \
-exportProvisioningProfile "Our Adhoc Provisioning Profile"

and

xcodebuild -exportArchive -archivePath OurApp.xcarchive \
-exportPath OurApp-enterprise.ipa -exportFormat "ipa" \
-exportProvisioningProfile "Our Enterprise Provisioning Profile"

Note that we would have our servers set the appropriate code sign identity before running these exportArchive commands. This worked really well for us since we could use the same xcarchive(takes 8 minutes to compile) and create multiple variants with it(exportArchive step doesn't take more than 30 seconds).

In Xcode7, Apple Introduced exportOptionsPlist. Xcode 7 also saw the introduction of features such as Swift Support and Universal Links, both of which we deploy. These two features require you to use exportOptionsPList it seems. The only way I was able to get exportOptionsPlist is that I could no longer set CODE_SIGN_IDENTITY and PROVISIONING_PROFILE to "" when generating IPA. As a result, our build times will double since we now have to build the xcarchive twice

I was wondering if anyone knows a way to create an enterprise IPA and an adhoc ipa using the same xcarchive.

嗨,这是不可能的,因为每当您从存档中创建iPA时,它都会分别为Adhoc或Enterprise或其他用户创建每个iPA。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM