Skip to content

Commit

Permalink
Fix Xcode build path in the static lib build script for Xcode 4.3.1+ …
Browse files Browse the repository at this point in the history
…or version downloaded from App Store

Summary: Previously xcodebuild could be found under the /Developer directory but it has since moved for Xcode downloaded from the App Store. If the developer has migrated from one version to another, then calling "which xcodebuild" will not work, unless they have run a script called "xcode-select switch". So for now we first check the older location, then look in the newer App Store location.

Test Plan: I tried running the build script in my folder after a recent upgrade from 4.2 to 4.3.1. Without the build script change I got an error. With the build script change, the library was generated.

Reviewers: mmarucheck, bruce, jacl

Reviewed By: jacl

CC: selekman, vijaye, jacl, gregschechte

Differential Revision: https://phabricator.fb.com/D440943

Revert Plan: OK

Task ID: 998703
  • Loading branch information
Christine Abernathy committed Apr 3, 2012
1 parent 07626c3 commit 0fb2954
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/build_facebook_ios_sdk_static_lib.sh
Expand Up @@ -19,8 +19,15 @@ die() {
}

# The Xcode bin path
XCODEBUILD_PATH=/Developer/usr/bin
if [ -d "/Developer/usr/bin" ]; then
# < XCode 4.3.1
XCODEBUILD_PATH=/Developer/usr/bin
else
# >= XCode 4.3.1, or from App store
XCODEBUILD_PATH=/Applications/XCode.app/Contents/Developer/usr/bin
fi
XCODEBUILD=$XCODEBUILD_PATH/xcodebuild
test -x "$XCODEBUILD" || die "Could not find xcodebuild in $XCODEBUILD_PATH"

# Get the script path and set the relative directories used
# for compilation
Expand Down

0 comments on commit 0fb2954

Please sign in to comment.