Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture x86_64 in Xcode after Firebase update

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'

like image 992
Ronen Avatar asked May 25 '17 19:05

Ronen


4 Answers

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

like image 190
ArNo Avatar answered Nov 18 '22 19:11

ArNo


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.

like image 22
ericl Avatar answered Nov 18 '22 20:11

ericl


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
like image 3
wstejka Avatar answered Nov 18 '22 19:11

wstejka


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.

like image 2
David Seek Avatar answered Nov 18 '22 19:11

David Seek