大佬教程收集整理的这篇文章主要介绍了xcode – 命令行新手并尝试构建脚本 – 这个错误意味着什么?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
Joels-MACBook-Air:~ joel$/Users/joel/Desktop/NameOfApp/build_facebook_ios_sdk_static_lib.sh
这是我得到的输出:
Project Home: /Users/joel/Desktop Start Universal facebook-ios-sdk SDK Generation Step 1 : facebook-ios-sdk SDK Build Library for simulator and device architecture /Users/joel/Desktop/NameOfApp/build_facebook_ios_sdk_static_lib.sh: line 56: cd: /Users/joel/Desktop/src: No such file or directory Build setTings from command line: SDKROOT = iphonesimulator5.1 SymROOT = /Users/joel/Desktop/build xcodebuild: error: The directory /Users/joel/Desktop does not contain an Xcode project.
我假设上面的问题很清楚,但以下是脚本的代码 – 如果它不相关,请忽略它:
!/bin/sh /* Copyright 2004-present Facebook. All Rights Reserved. This script will build a static library version of the Facebook iOS SDK. You may want to use this script if you have a project that has the Automatic Reference CounTing feature turned on. Once you run this script you will get a directory under the iOS SDK project home path: lib/facebook-ios-sdk You can drag the facebook-ios-sdk directory into your Xcode project and copy the contents over or include it as a reference.*/ //Function for handling errors die() { echo "" echo "$*" >&2 exit 1 } //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" // Get the script path and set the relative directories used for compilation cd $(dirname $0) SCRIPTPATH=`pwd` cd $SCRIPTPATH/../ //The home directory where the SDK is installed PROjeCT_HOME=`pwd` echo "Project Home: $PROjeCT_HOME" //The facebook-ios-sdk src directory path SRCPATH=$PROjeCT_HOME/src //The directory where the target is built BUILDDIR=$PROjeCT_HOME/build //The directory where the library output will be placed LIBOUTPUTDIR=$PROjeCT_HOME/lib/facebook-ios-sdk echo "Start Universal facebook-ios-sdk SDK Generation" echo "Step 1 : facebook-ios-sdk SDK Build Library for simulator and device architecture" cd $SRCPATH $XCODEBUILD -target "facebook-ios-sdk" -sdk "iphonesimulator" -configuration "Release" SymROOT=$BUILDDIR clean build || die "iOS Simulator build Failed" $XCODEBUILD -target "facebook-ios-sdk" -sdk "iphoneos" -configuration "Release" SymROOT=$BUILDDIR clean build || die "iOS Device build Failed" echo "Step 2 : Remove older SDK Directory" \rm -rf $LIBOUTPUTDIR echo "Step 3 : Create new SDK Directory Version" mkdir -p $LIBOUTPUTDIR echo "Step 4 : Create combine lib files for varIoUs platforms into one" //combine lib files for varIoUs platforms into one lipo -create $BUILDDIR/Release-iphonesimulator/libfacebook_ios_sdk.a $BUILDDIR/Release-iphoneos/libfacebook_ios_sdk.a -output $LIBOUTPUTDIR/libfacebook_ios_sdk.a || die "Could not create static output library" echo "Step 5 : Copy headers Needed" \cp $SRCPATH/*.h $LIBOUTPUTDIR/ \cp $SRCPATH/JSON/*.h $LIBOUTPUTDIR/ echo "Step 6 : Copy other file needed like bundle" \cp -r $SRCPATH/*.bundle $LIBOUTPUTDIR echo "Finished Universal facebook-ios-sdk SDK Generation" echo "" echo "You can Now use the static library that can be found at:" echo "" echo $LIBOUTPUTDIR echo "" echo "Just drag the facebook-ios-sdk directory into your project to include the Facebook iOS SDK static library" echo "" echo "" exit 0
我的下一步是什么?
感谢帮助,伙计们和女孩们.
以上是大佬教程为你收集整理的xcode – 命令行新手并尝试构建脚本 – 这个错误意味着什么?全部内容,希望文章能够帮你解决xcode – 命令行新手并尝试构建脚本 – 这个错误意味着什么?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。