Firebase更新后,Xcode中架构x86_64的未定义符号
我更新了FirebaseUI到最新版本,并更新TwitterCore 3.0.0(是2.8.0),自从我在Xcode中得到这个编译器错误:
Undefined symbols for architecture x86_64: "_TWTRIdentifierForAdvertising", referenced from: +[TWTRCardConfiguration deviceID] in TwitterKit(TWTRCardConfiguration.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我目前恢复到以前版本的TwitterCore,即使它没有明确写入我的Podfile中。 我写了pod 'TwitterCore', '~>2.8.0'
我修正了TwitterCore> 3.0.0对于FirebaseUI> 3.0.0或更新窗格有问题
pod 'FirebaseUI' pod 'TwitterCore', '<=2.8.0' # fixed
祝你好运
即使我没有使用TwitterCore,我也得到了类似的错误(“_TWTRIdentifierForAdvertising”,更新到Firebase 4.0.0后引用:)。 并通过从podfile中消除“FirebaseUI”来解决它。 然后,我注意到,在Firebase DatabaseExample podfile中包含了quickstart-ios,“FirebaseUI”被重命名为“FirebaseUI / Database”。 我用正确的名字将它添加到podfile中,并且全部显示正常。
我已经解决了它通过使用:
# Uncomment this line to define a global platform for your project platform :ios, '9.0' # Uncomment this line if you're using Swift use_frameworks! target 'app name' do #pod 'FirebaseUI' pod 'FirebaseUI/Database' pod 'Firebase/Storage' post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end end
正如您所看到的,我已经评论了FirebaseUI
并使用FirebaseUI/Database
来Firebase/Storage
数据库和Firebase/Storage
。
如果你仍然在努力解决这个错误,那么在这里你可以find我的解决scheme。 我注意到上面的一些解决scheme并没有解决Twitter包的问题,因为他们只是删除引用,这对于那些想要处理Twitterfunction的人来说不是一个正确的方法。
目前, FirebaseUI
版本是4.1.1
而TwitterKit
> = 2.4
满足了它的要求,但根据我的testing,最新的2. *版本(现在是2.8.1)会产生错误,并带有未定义的符号引用。
我检查出FirebaseUI
4.1.1在早期的TwitterKit
2.7中工作得很好。 所以我的解决scheme是只是迫使te cocoapod来安装这个版本。
遵循以下步骤:
1)将这两个实例添加到您的Podfile。 (如果您不想全部安装,可以select性地添加FirebaseUI的子configuration)。
pod 'TwitterKit' , '2.7' pod 'FirebaseUI', '~> 4.0'
2)运行:
pod update
这将是一个如何定义podfile版本的例子。
例:
目标是“Your_project”
pod 'Firebase', '~> 1.0'
结束
在我的情况下,这只是评论:
# pod 'FirebaseUI/Twitter'
在Xcode 9,Swift 3,Firebase中
– > _TWTRIdentifierForAdvertising“,引用
这帮助我:
首先添加你的Podfile:pod'FirebaseUI' ,'〜> 4.0'
之后:pod更新