user1872384
user1872384

Reputation: 7147

How to build enterprise ipa using xcode command line?

Usually I use Xcode to build ipa file using enterprise build:

enter image description here

enter image description here

enter image description here

enter image description here

What's the equivalent of these using xcodebuild?

How to set the "exportOptions.plist", especially the key tag?

Upvotes: 3

Views: 2858

Answers (1)

Jens Meder
Jens Meder

Reputation: 4377

I assume you are using Xcode 8.3 or above. Then the following should do the trick:

xcodebuild -scheme <scheme> -exportArchive -archivePath <xcarchivepath> -exportPath <destinationpath> -exportOptionsPlist <plistpath> with

  • <scheme>: the name of the scheme you want to build and export
  • <xcarchivepath: directory where any created archives will be placed, or the archive that should be exported
  • <destinationpath>: destination for the product exported from an archive
  • <plistpath>: path to the plist file that configures archive exporting (see content below, the teamID entry is optional)

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
       <key>method</key>
       <string>enterprise</string>
    </dict>
    </plist>
    

You can get a list with all available keys for the plist file by running xcodebuild -h in Terminal.

Hope that helps.

Upvotes: 4

Related Questions