How do I figure out what my absolute ${PROJECT_DIR}
path is for my Xcode project? Is there a way to print this in Terminal? How?
PROJECT_DIR. Identifies the directory containing the project ( .xcodeproj ) $(PROJECT_DIR)/build is used as the create the default value for: Intermediate Build Files Path OBJROOT.
It should by located in: ~/Library/Developer/Xcode/DerivedData . Show activity on this post. You can configure the output directory using the CONFIGURATION_BUILD_DIR environment variable.
Open your project or workspace in Xcode and navigate to the Project navigator. Control-click the ci_scripts group you created earlier and choose New File. Choose the Shell Script template.
Build Settings -> Preprocess Macros
PROJECT_DIR=@\""$PROJECT_DIR"\" BUILD_ROOT=@\""$(BUILD_ROOT)"\"
Then you can log it directly
NSLog(@"project dir=%@, BUILD_ROOT_=%@", PROJECT_DIR, BUILD_ROOT);
Run this from Terminal
For a project:
xcodebuild -project yourProject.xcodeproj -target yourTarget -showBuildSettings | grep PROJECT_DIR
For a workspace:
xcodebuild -workspace yourWorkspace.xcworkspace -scheme yourScheme -showBuildSettings | grep PROJECT_DIR
As you can see, you can retrieve any other build settings value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With