我設法讓靜態庫工作,它的一切正常。現在我已經進入適當的圖書館了,我想創建Im有問題。我使用cocoapods導入其他文件,並創建一個工作區。現在我編譯的腳本不再有效,我的假設是因爲我現在在框架中工作。我一直在Google上搜尋幾個小時試圖獲得答案,但所有我發現的事情只涉及到將一個項目變成一個庫 我的問題是: 1)是否可以將工作區組合到一個單一的庫中? 2)我應該嘗試創建一個框架嗎? 3)它只是我的腳本不正確嗎?從工作區創建靜態庫
XCODEBUILD_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin
XCODEBUILD=$XCODEBUILD_PATH/xcodebuild
$XCODEBUILD -project T5Pusher.xcodeproj -target "T5Pusher" -sdk "iphoneos" - configuration "Release" clean build
$XCODEBUILD -project T5Pusher.xcodeproj -target "T5Pusher" -sdk "iphonesimulator" - configuration "Release" clean build
lipo -create -output "build/libT5Pusher.a" "build/Release-iphoneos/libT5Pusher.a" "build/Release-iphonesimulator/libT5Pusher.a"
也試過這種
XCODEBUILD_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin
XCODEBUILD=$XCODEBUILD_PATH/xcodebuild
$XCODEBUILD -workspace T5Pusher.xcworkspace -scheme "T5Pusher" -sdk "iphoneos" - configuration "Release" clean build
$XCODEBUILD -workspace T5Pusher.xcworkspace -scheme "T5Pusher" -sdk "iphonesimulator" - configuration "Release" clean build
lipo -create -output "build/libT5Pusher.a" "build/Release-iphoneos/libT5Pusher.a" "build/Release-iphonesimulator/libT5Pusher.a"
我得到的錯誤是
** BUILD FAILED **
The following build commands failed:
Libtool build/PusherTest.build/Release-iphoneos/PusherTest.build/Objects- normal/armv7/libPusherTest.a normal armv7
Libtool build/PusherTest.build/Release-iphoneos/PusherTest.build/Objects-normal/armv7s/libPusherTest.a normal armv7s
(2 failures)
lipo: can't open input file: build/Release-iphoneos/libPusherTest.a (No such file or directory)
Showing first 200 notices only
和第二,構建成功,但庫(.a)中從來沒有因此它創建的文件不能合併它們
它以什麼方式不起作用?有錯誤嗎? – hooleyhoop
更新錯誤 – walsh06