0

As per facebook's dev docs :

Creating an iOS Facebook SDK Static Library

If you create an iOS app that has Automatic Reference Counting (ARC) enabled then you should use a static library version of the iOS Facebook SDK instead of dragging in the files from the src folder. The latest release of the iOS Facebook SDK includes a shell script you can run to build the static library. You would do this through the command line by calling the build_facebook_ios_sdk_static_lib.sh build script found under the scripts directory, for example:

% ~/facebook-ios-sdk/scripts/build_facebook_ios_sdk_static_lib.sh

but when I try to run the above script I get an error saying :

Could not find xcodebuild in /Applications/XCode.app/Contents/Developer/usr/bin

I tried opening the script and found this price of code responsible for the error :

# The Xcode bin path
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"

How could I tweak the script to fix the above issue?

Vikas Singh
  • 1,781
  • 7
  • 27
  • 54

1 Answers1

0

Make sure you xcode 4.3.2 has been installed in a default location(/Applications/Xcode.app), since Facebook is making that assumption when searching for xcodebuild binary.

If xcode 4.3.2 is located in a different folder, just modify the above script to account for that.

Btw, on my system, I do have xcodebuild; and it is located at : /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

Aki
  • 3,709
  • 2
  • 29
  • 37