0

I have a framework that I need to build manually as a part of my run-script in xcode.

How can I copy the build setting from the current project when building it?

xcodebuild 
  -project "$PROJECT_DIR/myProject/MyProject.xcodeproj" 
  -scheme MyProject 
  -configuration "$MY_PROJECT_CONFIGURATION" 
  CONFIGURATION_BUILD_DIR="$APP_BUILD_DIR" 
  build

I'm specifically having problem matching -destination. Is there a way to get the -destination used to build the current project and pass it to xcodebuild

aryaxt
  • 76,198
  • 92
  • 293
  • 442

1 Answers1

0

Xcode offers this as a Environmental Variable:

build_dir=${BUILD_DIR} 
//use it 
... -destination $build_dir ...

This answer shows how to get all Environmental Variables.

shallowThought
  • 19,212
  • 9
  • 65
  • 112