Building Xcode Project in Terminal – Choosing another Xcode
I have two different Xcode version installed on the same mac (Xcode 4 and Xcode 5). Xcode 4 is in the Applications folder.
So whenever I build any projects from the terminal, naturally it compiles by using Xcode 4. Is there any way to use Xcode 5 (which is in desktop) to build a project from the terminal?
- UITextView keyboardDismissMode Bug
- Will #if __IPHONE_4_0 work on iPad?
- Core Data Migration: Attribute Mapping Value Expression
- Cannot conform to STPAddCardViewControllerDelegate since Xcode 8 GM on Swift 3
- adding barButtonItems to a UINavigationBar without a Navigation Controller
2 Solutions Collect From Internet About “Building Xcode Project in Terminal – Choosing another Xcode”
I think the command
xcode-select is here for this precise reason.
Usage: xcode-select [options] Print or change the path to the active developer directory. This directory controls which tools are used for the Xcode command line tools (for example, xcodebuild) as well as the BSD development commands (such as cc and make). Options: -h, --help print this help message and exit -p, --print-path print the path of the active developer directory -s <path>, --switch <path> set the path for the active developer directory -v, --version print the xcode-select version -r, --reset reset to the default command line tools path
I had the same problem. I had changed the command-line tools option in Xcode’s preferences. Here you can choose which version of Xcode, you wanted to use.
- Function inside prepareForSegue will not execute
- Facebook login – stays at white web page SWIFT
- OSX application without storyboard or xib files using Swift
- SwiftyJSON – 'inout JSON' is not convertible to 'JSON'
- Unity3D integration with UIView
- Is there a way to retrieve iTunes Persistent ID on iPhone?
- Retrieving date of birth with Google OAuth API
- Can UIPinchGestureRecognizer and UIPanGestureRecognizer Be Merged?
- Xcode – Create csv/spreadsheet file
- How to show “Copy” menu for a table cell?
- Cocoa – go to foreground/background programmatically
- Cocoapods: Unable to find a specification for `Firebase/Core`
- How does TestFlight do it?
- Xcode 7 – Code coverage data generation failed
- Detect if a user has typed an emoji character in UITextView