Reputation: 30598
I would like to use terminal to automatic my application build working flow, how can I change the cert and build the application from terminal only? Thanks.
Upvotes: 0
Views: 265
Reputation:
Yes, you may use terminal to build the app.
There is an xcodebuild
tool which allows to do that ($ man xcodebuild
would explain a lot).
As for your question – as I understand you're trying to make a build with a different mobileprovision profile. It's possible by adding PROVISIONING_PROFILE
parameter to xcodebuild command. And you need to provide profile's UUID.
In two words, each mobileprovision profile has an identifier and it should be "installed" (installation via Xcode is OK). So, you should follow these steps to make a build from the terminal:
Get the mobileprovisioning UUID. The simplest way to do that is the next:
<key>UUID</key>
string and the corresponding identifier (it should look like AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
), BTW this UUID is used by Xcode as a file name.Go to your project's folder in terminal (this one which contains .xcodeproj
) and run the next command:
xcodebuild PROVISIONING_PROFILE=<YOUR-PROFILE-IDENTIFIER>
That would make a build and store its results in build
directory.
You may also specify configuration which should be used, base sdk, target and a lot of different parameters.
Upvotes: 1