Set xcode build setting from terminal?
What You can do is to run:
xcodebuild -target <target> -configuration <configuration> -showBuildSettings
This command shows all the settings that are filled for target and configuration passed. Find the name of the key that contains $(SDKROOT)/ResourceRules.plist
(let call it THE_KEY) and then try:
xcodebuild -target <target> -configuration <configuration> THE_KEY=<new_value>
Don't guarantee that it will work.
Running xcodebuild twice from a Cocoa app (via NSTask) silently fails
It seems as though I ran into a bug in Xcode, something similar to this:
NSTask NSPipe - objective c command line help
Basically, Xcode will hold on to the output of the NSTask if NSTask has already been launched once.
The solution was to switch the Task's standard input thusly:
[task setStandardInput:[NSPipe pipe]];
As soon as I put that into the runTaskOne method, everything started working nicely.
Cannot build XCode project from command line but can from XCode
In addition to unlocking the keychain, you might also specify the codesign identity (or set it in your target). Development certs take the form 'iPhone Developer: Company Inc', distribution certs like this 'iPhone Distribution: Company Inc'.
xcodebuild -project George.xcodeproj -alltargets -parallelizeTargets -configuration Debug build CODE_SIGN_IDENTITY='iPhone Developer: Company Inc'
iphone : xcodebuild command from terminal not working, How to?
- Install it to /Developer. It might make your life easier.
- Try
xcode-select /path/to/developer
. You haven't specified where you've installed it, so I can't help more. - There is no iphonesimulator3.1.3 in the latest SDK. You could try
xcodebuild -sdk iphonesimulator4.0 ...
.
How to run xcodebuild commands via ssh?
My guess is that although you have the proper items within your Keychain it still needs to be unlocked before it can execute the build process properly. When ssh
in (before building) try:
$ security unlock-keychain
If your keychain is not unlocked, it needs a window server connection
in order to prompt the user to unlock the keychain. Use security(1) to
unlock the keychain on the remote machine prior to executing the
xcodebuild.
If that doesn't work for you please review this question and subsequent answers.
xcodebuild fails to build from terminal but succeeded from xcode
I have found an answer.
Since custom frameworks were announced only in iOS 8, -sdk iphonesimulator8.0
need to be added to the script, it defines Xcode to build the project only for Ios 8.
it should look like:
xcodebuild -project <projName> -scheme <schemeName> -sdk iphonesimulator8.0 -configuration Debug clean build
this code works
xcodebuild fails, but building from Xcode succeeds
You might accidentally build the Xcode project instead of the Xcode Workspace from xcodebuild
.
If this is the case, replace:
xcodebuild -project "<*yourProjectFile*>.xcodeproj"
with:
xcodebuild -workspace <*yourWorkspaceFile*>.xcworkspace
After fixing this I get the exact same results from Xcode and xcodebuild
.
Related Topics
Async Request Does Not Enter Completion Block
Creating Thumbnail from Local Video in Swift
Linking Child View Controllers to a Parent View Controller Within Storyboard
Atos and Dwarfdump Won't Symbolicate My Address
Storyboard Reference in Xcode, Where Should We Use It
Swift Protocol Get Only Settable
How to Get HTML Source from Url with Swift
Swift: Long Press Gesture Recognizer - Detect Taps and Long Press
Where Do I Find iOS Obj-C Code to Scan and Connect to Wifi (Private API)
Eraser Not Working in iOS Drawing
Expected Declaration Error for Making High Score
How to Add Older Version of iOS Sdk in Xcode 4.5
How to Develop iPhone Mdm Server
The App Delegate Must Implement the Window Property If It Wants to Use a Main Storyboard File Swift
How to Make Uiimagepickercontroller for Camera and Photo Library at the Same Time in Swift
iOS 13 Uibarbuttonitem Not Clickable and Overlapping Uinavigationbars When Using Uisearchcontroller
Do We Need to Use _Weak Self Inside Uianimationblocks in Arc