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
  • 73,272
  • 89
  • 288
  • 432

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
  • 18,342
  • 7
  • 61
  • 106