【发布时间】:2020-04-23 19:50:22
【问题描述】:
好的,我正在解决关于duplicate symbols in cocoa pods' architecture 的问题。在接受的解决方案中使用post_install 安装 pod 后,我构建了我的 xcworkspace 项目,但遇到以下错误:
Screenshot of location of file and error.
错误是:预处理器表达式中的预期行尾。
上线:#if HAVE_FULLFSYNC
方法中:SyncFd(int fd, const std::string& fd_path)
并且文件的位置是:Pods/Pods/leveldb-library/env_posix.cc
我添加的引发这一系列问题的 Pod 是来自 here 的“CodableFirebase”。
这是我的 Podfile:
platform :ios, '13.2'
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited), PodsDummy_Pods=SomeOtherNamePodsDummy_Pods'
end
end
end
target 'ShoeSwiperMenus' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for ShoeSwiperMenus
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod ‘FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI'
pod 'MaterialComponents/Buttons'
pod 'MaterialComponents/Buttons+Theming'
# pod 'MaterialComponents/schemes/Color'
pod 'Shuffle-iOS'
pod 'JGProgressHUD'
pod 'LBTATools'
pod 'CodableFirebase'
end
删除post_install 块时,我回溯到我原来的错误是:
ld:架构 x86_64 的 202 个重复符号。
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
我在这里真的超出了我的深度......我什至不知道如何开始解决这个问题(Google 上没有)。请帮忙!
【问题讨论】:
-
欢迎来到 SO。请阅读stackoverflow.com/help/minimal-reproducible-example。在这种情况下,至少提供您的 Podfile。
-
不确定如何使问题更完整或可重复...我不知道是什么首先触发了错误
-
你有没有得到这个?我怀疑你遇到了我现在遇到的类似问题stackoverflow.com/questions/70855053/…
标签: swift firebase cocoapods leveldb