我在 Swift Framework目标中有一个IOS项目。我按照教程将Facebook SDK(用于登录)集成到我的框架中。我编译我的框架没有错误。
然后我创建了一个集成我的框架的 Swift应用程序。我编译它时出现如下错误:
Ld /Users/youngworld/Library/Developer/Xcode/DerivedData/App3-bsiqheuhcocalbbvjkulchclprhg/Build/Products/Debug-iphonesimulator/App3.app/App3 normal x86_64
cd /Users/youngworld/IOSProjects/App3
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -L/Users/youngworld/Library/Developer/Xcode/DerivedData/App3-bsiqheuhcocalbbvjkulchclprhg/Build/Products/Debug-iphonesimulator -F/Users/youngworld/Library/Developer/Xcode/DerivedData/App3-bsiqheuhcocalbbvjkulchclprhg/Build/Products/Debug-iphonesimulator -F/Users/youngworld/IOSProjects/App3 -F/Users/youngworld/IOSProjects/App3/App3 -filelist /Users/youngworld/Library/Developer/Xcode/DerivedData/App3-bsiqheuhcocalbbvjkulchclprhg/Build/Intermediates/App3.build/Debug-iphonesimulator/App3.build/Objects-normal/x86_64/App3.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -objc_abi_version -Xlinker 2 -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/youngworld/Library/Developer/Xcode/DerivedData/App3-bsiqheuhcocalbbvjkulchclprhg/Build/Intermediates/App3.build/Debug-iphonesimulator/App3.build/Objects-normal/x86_64/App3.swiftmodule -framework YWSDK -framework YWSDK -Xlinker -dependency_info -Xlinker /Users/youngworld/Library/Developer/Xcode/DerivedData/App3-bsiqheuhcocalbbvjkulchclprhg/Build/Intermediates/App3.build/Debug-iphonesimulator/App3.build/Objects-normal/x86_64/App3_dependency_info.dat -o /Users/youngworld/Library/Developer/Xcode/DerivedData/App3-bsiqheuhcocalbbvjkulchclprhg/Build/Products/Debug-iphonesimulator/App3.app/App3
ld: framework not found FBSDKLoginKit for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有人告诉我修复它的方法。
谢谢!
答案 0 :(得分:0)
确保您的项目包含Bolts.framework,FBSDKCoreKit.framework和FBSDKLoginKit.framework,以便在您的应用程序中进行Facebook登录集成。 鉴于链接将帮助您: https://developers.facebook.com/apps/174570549964701/fb-login/quickstart/
(注意:如果您手动将框架添加到项目中,那么请重新检查框架是否在项目文件夹中,而不是像Downloads文件夹中的任何其他文件。如果您通过安装pod添加框架,那么这些框架位于项目的“Frameworks”文件夹中。 )