Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build enterprise ipa using xcode command line?

Tags:

xcodebuild

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?

like image 557
user1872384 Avatar asked Jun 20 '26 05:06

user1872384


1 Answers

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.

like image 136
Jens Meder Avatar answered Jun 23 '26 00:06

Jens Meder