在 iOS 上使用 Parse.framework 构建错误
Build error using Parse.framework on iOS
我尝试在我的项目中使用parse.framework,所以除了添加parse.framework
我也添加了这些
AudioToolbox.framework
CFNetwork.framework
CoreGraphics.framework
CoreLocation.framework
MobileCoreServices.framework
QuartzCore.framework
Security.framework
StoreKit.framework
SystemConfiguration.framework
libz.dylib
libsqlite3.dylib
因为我确实为 sphero RobotKit.framework 使用了 -ObjC 链接器标志,所以我也添加了这两个
Accounts.framework
Social.framework
但是,我遇到了错误
Ld /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos/SenseWatch.app/SenseWatch normal armv7
cd /Users/SharpPug/Documents/Repo/SenseWatch
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos -F/Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos -F/Users/SharpPug/Documents/Repo/SenseWatch/Frameworks -filelist /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Intermediates/SenseWatch.build/Debug-iphoneos/SenseWatch.build/Objects-normal/armv7/SenseWatch.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -ObjC -lstdc++ -lsqlite3 -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 -framework Social -framework Accounts -lsqlite3 -lz -framework SystemConfiguration -framework StoreKit -framework Security -framework QuartzCore -framework MobileCoreServices -framework CoreLocation -framework CoreGraphics -framework CFNetwork -framework AudioToolbox -framework ExternalAccessory -framework CoreMotion -framework RobotKit -framework CoreBluetooth -framework Parse -framework MicrosoftBandKit_iOS -Xlinker -dependency_info -Xlinker /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Intermediates/SenseWatch.build/Debug-iphoneos/SenseWatch.build/Objects-normal/armv7/SenseWatch_dependency_info.dat -o /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos/SenseWatch.app/SenseWatch
Undefined symbols for architecture armv7:
"_BFTaskMultipleExceptionsException", referenced from:
___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke226 in Parse(PFObject.o)
___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke319 in Parse(PFObject.o)
"_OBJC_CLASS_$_BFExecutor", referenced from:
objc-class-ref in Parse(ParseManager.o)
objc-class-ref in Parse(PFOfflineStore.o)
objc-class-ref in Parse(PF_Twitter.o)
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFPinningEventuallyQueue.o)
objc-class-ref in Parse(PFFile.o)
objc-class-ref in Parse(PFFileManager.o)
...
"_OBJC_CLASS_$_BFTask", referenced from:
objc-class-ref in Parse(PFSQLiteDatabase.o)
objc-class-ref in Parse(PFTwitterAuthenticationProvider.o)
objc-class-ref in Parse(ParseManager.o)
objc-class-ref in Parse(PFOfflineStore.o)
objc-class-ref in Parse(PF_Twitter.o)
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFPinningEventuallyQueue.o)
...
"_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
objc-class-ref in Parse(PFSQLiteDatabase.o)
objc-class-ref in Parse(PFOfflineStore.o)
objc-class-ref in Parse(PF_Twitter.o)
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFEventuallyQueue.o)
objc-class-ref in Parse(PFTaskHTTPRequestOperation.o)
objc-class-ref in Parse(BFTask+Private.o)
...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
您还需要从此处包含 Parse SDK:
https://parse.com/docs/downloads
Parse.framework
ParseUI.framework
等等
最简单的方法(如果您对项目不太了解)实际上是从一个快速启动项目开始。
我尝试在我的项目中使用parse.framework,所以除了添加parse.framework 我也添加了这些
AudioToolbox.framework
CFNetwork.framework
CoreGraphics.framework
CoreLocation.framework
MobileCoreServices.framework
QuartzCore.framework
Security.framework
StoreKit.framework
SystemConfiguration.framework
libz.dylib
libsqlite3.dylib
因为我确实为 sphero RobotKit.framework 使用了 -ObjC 链接器标志,所以我也添加了这两个
Accounts.framework
Social.framework
但是,我遇到了错误
Ld /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos/SenseWatch.app/SenseWatch normal armv7
cd /Users/SharpPug/Documents/Repo/SenseWatch
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos -F/Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos -F/Users/SharpPug/Documents/Repo/SenseWatch/Frameworks -filelist /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Intermediates/SenseWatch.build/Debug-iphoneos/SenseWatch.build/Objects-normal/armv7/SenseWatch.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -ObjC -lstdc++ -lsqlite3 -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 -framework Social -framework Accounts -lsqlite3 -lz -framework SystemConfiguration -framework StoreKit -framework Security -framework QuartzCore -framework MobileCoreServices -framework CoreLocation -framework CoreGraphics -framework CFNetwork -framework AudioToolbox -framework ExternalAccessory -framework CoreMotion -framework RobotKit -framework CoreBluetooth -framework Parse -framework MicrosoftBandKit_iOS -Xlinker -dependency_info -Xlinker /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Intermediates/SenseWatch.build/Debug-iphoneos/SenseWatch.build/Objects-normal/armv7/SenseWatch_dependency_info.dat -o /Users/SharpPug/Library/Developer/Xcode/DerivedData/SenseWatch-ftxgnedstrsxkufpnnuizgjbgbni/Build/Products/Debug-iphoneos/SenseWatch.app/SenseWatch
Undefined symbols for architecture armv7:
"_BFTaskMultipleExceptionsException", referenced from:
___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke226 in Parse(PFObject.o)
___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke319 in Parse(PFObject.o)
"_OBJC_CLASS_$_BFExecutor", referenced from:
objc-class-ref in Parse(ParseManager.o)
objc-class-ref in Parse(PFOfflineStore.o)
objc-class-ref in Parse(PF_Twitter.o)
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFPinningEventuallyQueue.o)
objc-class-ref in Parse(PFFile.o)
objc-class-ref in Parse(PFFileManager.o)
...
"_OBJC_CLASS_$_BFTask", referenced from:
objc-class-ref in Parse(PFSQLiteDatabase.o)
objc-class-ref in Parse(PFTwitterAuthenticationProvider.o)
objc-class-ref in Parse(ParseManager.o)
objc-class-ref in Parse(PFOfflineStore.o)
objc-class-ref in Parse(PF_Twitter.o)
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFPinningEventuallyQueue.o)
...
"_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
objc-class-ref in Parse(PFSQLiteDatabase.o)
objc-class-ref in Parse(PFOfflineStore.o)
objc-class-ref in Parse(PF_Twitter.o)
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFEventuallyQueue.o)
objc-class-ref in Parse(PFTaskHTTPRequestOperation.o)
objc-class-ref in Parse(BFTask+Private.o)
...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
您还需要从此处包含 Parse SDK:
https://parse.com/docs/downloads
Parse.framework
ParseUI.framework 等等
最简单的方法(如果您对项目不太了解)实际上是从一个快速启动项目开始。