【发布时间】:2020-05-17 07:22:59
【问题描述】:
最近由于某种原因,我无法通过 Xcode 甚至命令行在物理设备上运行我的 React Native 应用程序。我收到以下错误:
duplicate symbol '_md5_block_data_order' in:
/XXX/Library/Developer/Xcode/DerivedData/XXXX-bdrylwsxpcqgzvgkcljteyttcdmr/Build/Products/Debug-iphoneos/BoringSSL-GRPC/libBoringSSL-GRPC.a(md5.o)
/XXX/project/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(md5_dgst.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
但是,它在模拟器上运行良好。而且我可以毫无问题地将应用上传到 AppStoreConnect。
据我了解,两个库中似乎存在相同的符号。不知道为什么,很可能是移动应用程序依赖项之一。
在安装的 Pod 列表中,我同时拥有 BoringSSL-GRPC (0.0.3) 和 OpenSSL-Universal (1.0.2.19)
Firebase 使用 BoringSSL,Flipper 使用 OpenSSL。
这是我使用的第三方依赖项列表:
pod 'Firebase/Core', '~> 6.3.0'
pod 'Firebase/Messaging', '~> 6.3.0'
pod 'Firebase/Firestore', '~> 6.3.0'
pod 'Firebase/Auth', '~> 6.3.0'
pod 'TrustKit'
pod 'Stripe', '16.0.0'
pod 'Amplitude-iOS', '~> 4.5'
pod 'Intercom', '~> 5.5.1'
flipper_pods()
当我将 Firebase 全部移除时,它运行良好,我可以在设备上运行我的应用程序。但我需要 Firebase...
知道如何解决这个问题吗?
谢谢!
【问题讨论】:
-
您在哪种模式下运行应用程序?您可能必须将其更改为调试模式。
-
我确实在设备上以调试模式运行它。
-
我试图从项目中删除 Firebase,我能够在设备上运行它。但此应用需要 Firebase。
-
你使用的是哪个 RN 版本? Flipper 在 RN 0.62 中完全实现,目前在 RC 中,RN Firebase 6.x 初始化模板在 RN 0.61 中。
-
RN 0.61.5 和 RN Firebase 5.5.6
标签: ios xcode firebase react-native react-native-firebase