![](/img/trans.png)
[英]iOS 6 - BluetoothManager framework - “NSObject” not found error
[英]ApplicationServices Framework not found error in ios
我試圖在ios應用程序中重用一個代碼。 該代碼具有針對mac和ios的多個框架。 我不知道哪個文件適用於mac os,哪個文件適用於ios,所以我將所有文件都包含在新項目中,還包含了框架,但是我收到了應用程序服務框架的錯誤。 我知道Application Services框架僅適用於MAC O,不適用於ios。 但是,如果我從項目中刪除ApplicationServices框架,則它將提供更多錯誤,因為它已在某些類中使用。 這是我的錯誤日志
ld /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator/FlacPlayerUniversal.app/FlacPlayerUniversal normal i386
cd "/Users/Documents/ios5 Examples/FlacPlayerUniversal"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator "-L/Users/Documents/ios5 Examples/FlacPlayerUniversal/opt/iphone-4.3/lib" "-L/Users/Documents/ios5 Examples/FlacPlayerUniversal/opt/iphone-simulator-4.3/lib" -F/Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator "-F/Users/Documents/ios5 Examples/FlacPlayerUniversal" -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Developer/Library/Frameworks -filelist /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Intermediates/FlacPlayerUniversal.build/Debug-iphonesimulator/FlacPlayerUniversal.build/Objects-normal/i386/FlacPlayerUniversal.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework CoreGraphics -framework ApplicationServices -framework Accelerate -framework CoreFoundation -framework CFNetwork -framework AudioToolbox -framework CoreAudio -framework UIKit -framework Foundation -lFLAC++ -lFLAC -lmpg123 -logg -lsndfile -lspeex -lspeexdsp -lvorbis -lvorbisenc -lvorbisfile -lwavpack -lFLAC++ -lFLAC -lmpg123 -logg -lsndfile -lspeex -lspeexdsp -lvorbis -lvorbisenc -lvorbisfile -lwavpack -o /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator/FlacPlayerUniversal.app/FlacPlayerUniversal
ld: framework not found ApplicationServices
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ failed with exit code 1
請幫助解決此錯誤。
OS X和iOS具有相似但不相同的框架。 您應該刪除所有依賴於OS X框架(不適用於iOS)的內容。
ApplicationServices框架在iOS上不可用。 因此,您需要修改框架,以使其不會嘗試鏈接到其iOS變體的ApplicationServices框架。 因此,當您為iOS編譯時,它也可能不會嘗試調用任何Mac OS X特定功能或引用任何Mac OS X特定符號。 沒有其他方法可以使它工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.