xcode - 编译 xcode 和 FBSDK 时出错
问题描述
创建程序集时会产生错误。
如果通过 .cdworkspace
duplicate symbol _OBJC_IVAR_$_FBSDKDeviceLoginCodeInfo._verificationURL in:
/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-hiyuaervseeqdjddnyzvacrngstr/Build/Products/ReleaseForRunning-iphoneos/FBSDKLoginKit/libFBSDKLoginKit.a(FBSDKDeviceLoginCodeInfo.o)
/Users/admin/Desktop/ios_idle/Frameworks/FacebookSDK/Plugins/iOS/FBSDKLoginKit.framework/FBSDKLoginKit(FBSDKDeviceLoginCodeInfo.o)
ld: 1197 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
如果通过 .xcodeproj
ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-aznohbyfwguqcwgiyilrfrsrcddz/Build/Products/ReleaseForRunning-iphoneos/FBSDKCoreKit'
ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-aznohbyfwguqcwgiyilrfrsrcddz/Build/Products/ReleaseForRunning-iphoneos/FBSDKLoginKit'
ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-aznohbyfwguqcwgiyilrfrsrcddz/Build/Products/ReleaseForRunning-iphoneos/FBSDKShareKit'
ld: library not found for -lBolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
如何修复它?
解决方案
我删除了项目中 FacebookSDK 文件夹中的所有内容,但文件 FacebookSDK/SDK/Resources/FacebookSettings.xml 除外。我保存了这个文件,这样我以后就不必重新添加我的设置了。然后我重新导入了 Facebook SDK。
在最近的版本中,SDK 似乎发生了一些重大的层次结构变化。更新到较新版本之一时,它没有正确删除所有冗余文件,导致跨不同版本的类重复。
推荐阅读
- sql - 获取sql中同一张表的CR_NO值
- node.js - 如何在节点 js 应用程序上创建 dist
- python - 从列中删除所有值并将其设为空白
- python - 如何在 Anaconda 中安装 freqrade?
- accessibility - 如何让屏幕阅读器读取文档加载和文档加载?
- c# - SemaphoreSlim 使用限制
- javascript - 如何在 react-google-maps/api 库中使用 containsLocation
- amazon-web-services - AWS EC2 退役
- javascript - 使用 JavaScript 将逻辑回归拟合到数据集并获得 beta 系数?
- nginx - 如何代理传递在两个不同端口上运行的两个应用程序