我正在尝试通过 npm 安装 react-native-fbsdk,虽然我的构建之前运行良好,但一旦我安装了库并安装了 pod,我就会收到以下错误:
ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCompatibility50'
ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
ld: warning: Could not find or use auto-linked library 'swiftFoundation'
ld: warning: Could not find or use auto-linked library 'swiftsimd'
ld: warning: Could not find or use auto-linked library 'swiftDarwin'
ld: warning: Could not find or use auto-linked library 'swiftUIKit'
ld: warning: Could not find or use auto-linked library 'swiftCore'
ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find or use auto-linked library 'swiftPhotos'
ld: warning: Could not find or use auto-linked library 'swiftSwiftOnoneSupport'
ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
ld: warning: Could not find or use auto-linked library 'swiftMetal'
ld: warning: Could not find or use auto-linked library 'swiftDispatch'
ld: warning: Could not find or use auto-linked library 'swiftAVFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
ld: warning: Could not find or use auto-linked library 'swiftCoreMIDI'
ld: warning: Could not find or use auto-linked library 'swiftCoreLocation'
Undefined symbols for architecture x86_64:
"protocol descriptor for Foundation.CustomNSError", referenced from:
protocol conformance descriptor for __C_Synthesized.related decl 'e' for FBSDKLoginError : Foundation.CustomNSError in __C_Synthesized in libFBSDKLoginKit.a(LoginManager.o)
"method descriptor for static Foundation.CustomNSError.errorDomain.getter : Swift.String", referenced from:
protocol conformance descriptor for __C_Synthesized.related decl 'e' for FBSDKLoginError : Foundation.CustomNSError in __C_Synthesized in libFBSDKLoginKit.a(LoginManager.o)
"method descriptor for Foundation.CustomNSError.errorUserInfo.getter : [Swift.String : Any]", referenced from:
protocol conformance descriptor for __C_Synthesized.related decl 'e' for FBSDKLoginError : Foundation.CustomNSError in __C_Synthesized in libFBSDKLoginKit.a(LoginManager.o)
"method descriptor for Foundation.CustomNSError.errorCode.getter : Swift.Int", referenced from:
protocol conformance descriptor for __C_Synthesized.related decl 'e' for FBSDKLoginError : Foundation.CustomNSError in __C_Synthesized in libFBSDKLoginKit.a(LoginManager.o)
"base conformance descriptor for Foundation.CustomNSError: Swift.Error", referenced from:
protocol conformance descriptor for __C_Synthesized.related decl 'e' for FBSDKLoginError : Foundation.CustomNSError in __C_Synthesized in libFBSDKLoginKit.a(LoginManager.o)
"protocol descriptor for Foundation._ErrorCodeProtocol", referenced from:
... etc
我到处搜索这个问题的解决方案,但我没有看到如何解决这个库问题。
我在 React Native .60.5 上 - 这个问题有什么解决方案吗?
最佳答案
要解决此问题,您只需添加 快速文件 和 ** 在您的 Xcode 项目中“创建桥接头”**。
或者你可以看到下面的链接来很好地理解这一点
Why linker link static libraries with errors? iOS
关于react-native - 安装 react-native-fbsdk 后无法找到或使用自动链接库 '...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61992533/