[WWDC21] Distribute apps in Xcode with cloud signing (Xcoude build with cloud signing)

less than 1 minute read

Xcode13

Archiving

$ xcodebuild -project $WORKSPACE/sampleapp.xcodeproj \
  -scheme sampleapp-scheme \
  clean archive -archivePath ~/Documents/sampleapp/sampleapp.xcarchive

Exporting

Export iPA file

  • sampleapp_appstore_upload.plist file export_plist

  • Export sampleapp.ipa

    $ xcodebuild -exportArchive \
    -archivePath ~/Documents/sampleapp/sampleapp.xcarchive \
    -exportOptionsPlist ~/Documents/sampleapp/sampleapp_appstore_upload.plist \
    -exportPath ~/Documents/sampleapp/sampleapp.ipa
    

Automating Distribution With cloud signing

  • sampleapp_appstore_upload.plist file cloudsinging_plist

  • Use App Store Connect Keys
    $ xcodebuild -exportArchive \
    -archivePath ~/Documents/sampleapp/sampleapp.xcarchive \
    -exportOptionsPlist ~/Documents/sampleapp/sampleapp_appstore_upload.plist \
    -authenticationKeyIssuerID xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx \
    -authenticationKeyID xxxxxxxxxx \
    -authenticationKeyPath ~/PrivateKeys/AuthKey_xxxxxxxxx.p8 \
    -allowProvisioningUpdates
    
  • If you sign in With Xcode, the only required flag will be ‘-allowProvisioningUpdates’
    $ xcodebuild -exportArchive \
    -archivePath ~/Documents/sampleapp/sampleapp.xcarchive \
    -exportOptionsPlist ~/Documents/sampleapp/sampleapp_appstore_upload.plist \
    -allowProvisioningUpdates
    

Reference

Leave a comment