Undefined symbols for architecture x86_64 in Xcode after Firebase update

断了今生、忘了曾经 提交于 2019-12-10 12:32:31

问题


I updated FirebaseUI to the newest version, and that updated TwitterCore 3.0.0 (was 2.8.0), ever since I get this compiler error in 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)

I currently reverted back to the previous version of TwitterCore even though it wasn't explicitly written in my Podfile. I wrote pod 'TwitterCore', '~>2.8.0'


回答1:


I have fixed TwitterCore >3.0.0 is problem for FirebaseUI > 3.0.0 or update pod

pod 'FirebaseUI'
pod 'TwitterCore', '<=2.8.0' # fixed

Good luck




回答2:


I noticed in the Firebase DatabaseExample podfile included with quickstart-ios that 'FirebaseUI' was renamed 'FirebaseUI/Database'. I added it to the podfile with the correct name and all appears to be ok.




回答3:


If you are still struggling with this error then here you go my solution. I noticed that some of above solutions don't fix the problem with Twitter package as they just remove reference to it which is not a correct approach for those people who want to deal with Twitter feature.

At the moment, FirebaseUI version is 4.1.1 and TwitterKit >= 2.4 satisfies its requirements but according to my test the latest 2.* version (which is now 2.8.1) generate error with undefined symbol reference.

I checked out that FirebaseUI 4.1.1 works just fine with earlier TwitterKit 2.7. So my solution is to just force te cocoapod to install this version.

Follow along the procedure:

1) Add these two instances to your Podfile. (you can add selectively the subspecs of FirebaseUI if you don't want to install them all).

pod 'TwitterKit' , '2.7' 

pod 'FirebaseUI', '~> 4.0'

2) Run:

pod update



回答4:


I have solved it by using:

# 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

So as you can see, I have commented FirebaseUI and used FirebaseUI/Database for database and Firebase/Storage for storage.




回答5:


This would be an example of how to define the podfile version.

Exemple:

target 'Your_project' do

pod 'Firebase', '~> 1.0'

end




回答6:


In my case it was just commented out this :

# pod 'FirebaseUI/Twitter'




回答7:


In Xcode 9, Swift 3, Firebase

-> _TWTRIdentifierForAdvertising", referenced

Thats help me:

first add in your Podfile: pod 'FirebaseUI', '~> 4.0'

after: pod update




回答8:


If you use it pod in testing. You must add pod in MyAppTests target.

for example:

platform :ios, '9.0'

target 'MyApp' do
  use_frameworks!

  pod 'TwitterCore', '~>3.0.0'

  target 'MyAppTests' do
    inherit! :search_paths

    pod 'TwitterCore', '~>3.0.0'

  end

end


来源:https://stackoverflow.com/questions/44188112/undefined-symbols-for-architecture-x86-64-in-xcode-after-firebase-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!