rv2lgw
Last Updated: October 16, 2018
·
39.81K
· hermanlintvelt

Use xcodebuild to build workspace vs project

We have spent quite some time tuning our automated build scripts.

You can build a specific scheme that is part of a Xcode workspace (.xcworkspace) by using the command:

xcodebuild -workspace *yourWorkspaceFile* -scheme *schemeName* -sdk "*targetSDK*" -configuration *buildConfig* CODE_SIGN_IDENTITY="*NameOfCertificateIdentity*" PROVISIONING_PROFILE="*ProvisioningProfileName" OTHER_CODE_SIGN_FLAGS="--keychain *keyChainName*"

To build a Xcode project (.xcodeproj), use this:

xcodebuild -project "*path/fileName*.xcodeproj" -target "*targetName*" -sdk "*targetSDK*" -configuration *buildConfig* CODE_SIGN_IDENTITY="*NameOfCertificateIdentity*" PROVISIONING_PROFILE="*ProvisioningProfileName" OTHER_CODE_SIGN_FLAGS="--keychain *keyChainName*"

Where:
yourWorkspaceFile : path and filename of workspace file, e.g. path/CoolGame.xcworkspace * (points to ./path/CoolGame.xcworkspace)*
schemeName : name of scheme defined in project, e.g. CoolGame
targetName : name of build target in project
targetSDK : e.g. iphoneos
buildConfig : Debug, Release or Distribution
NameOfCertificateIdentity : e.g. iPhone Developer: My Name (738d039880d)
ProvisioningProfileName: e.g. Cool Game Development Profile
keyChainName: points to your keychain that can open development certificate, e.g. /Users/johnsmith/Library/Keychains/login.keychain

4 Responses
Add your response

30555
about 2 months ago ·
30647

http://kissanime.su/

thanks for this and very good one.

about 1 month ago ·
30905

Please ans. my que.
1. Do this code works proper?
2. Is it really works? As my team need such help. So if it is working properly, please Give your Feedbacks.

9 days ago ·
30994

Thanks. this is very helpful. finally got answers.

https://www.kissanime.vip/

2 days ago ·