I am using FirebaseAnalytics in a cocoa development pod, and facing an error during compilation, saying
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIRAnalytics", referenced from:
objc-class-ref in FirebaseService.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My pod file is like
pod 'Firebase/Crashlytics', :inhibit_warnings => true
pod 'Firebase/Analytics', :inhibit_warnings => true
and the podsec in the pod is like
spec.dependency 'Firebase/Crashlytics'
spec.dependency 'Firebase/Analytics'
It so only happens when I use any Analytics.* in my code in the development pod. If I move the logic to the AppDelegate (the main app project), there is no error.
I have tried cleaning up the Framework Search PATHs from both app and the development pod, as suggested in https://github.com/firebase/firebase-ios-sdk/issues/7614#issuecomment-786827116, but still no luck.
Any ideas?
Related
I'm having trouble implementing InMobi mediation SDK and adapter into iOS app. Built is resulting with error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GADMediatedNativeAdNotificationSource", referenced from:
objc-class-ref in InMobiAdapter(GADMAdapterInMobi.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm using coocapods as dependency manager. Here is my Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'APP-mobile' do
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleMobileAdsMediationInMobi'
pod 'lottie-ios'
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
end
target 'APP-desktop' do
end
I manage to solve it by using
pod 'InMobiSDK'
instead of
pod 'GoogleMobileAdsMediationInMobi'
and adding InMobiAdapter into project, download from here.
Complete instruction on InMobi Support Center.
When you build the project with
pod 'Google/SignIn'
pod 'GooglePlayGames'
It gets error.
Undefined symbols for architecture armv7:
"_GTMMethodCheckMethodChecker", referenced from:
+[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString32] in GTMNSDictionary+URLArguments.o
+[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString33] in GTMNSDictionary+URLArguments.o
ld: symbol(s) not found for architecture armv7 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
I uploaded this problem on the GTM's issue page and PlayGameService's issue page, It seems GPG isn't currently maintained.
perotinus, the developer of GTM said
GooglePlusOpenSource pod that it depends on. My guess is that the GooglePlusOpenSource pod has a precompiled version of GTM that doesn't have its symbols renamed, and the linker gets confused when it sees that in the set of libraries that it should use when trying to link the GTM pod.
Is there any possible idea to use it? I don't see downgrade is not the good option.
I got the same error for installation of pod Firebase/Auth and I install older version of GoogleToolboxForMac above Firebase/Auth that is pod 'GoogleToolboxForMac', '2.0.0'.After that firebase with compatible version of GoogleToolboxForMac start to install.On your podfile remove pod 'Google/SignIn' and pod 'GooglePlayGames'. Paste pod of older version of GoogleToolboxForMac just above pod 'Google/SignIn' and pod 'GooglePlayGames' and install it again.
pod 'GoogleToolboxForMac', '2.0.0'
pod 'Google/SignIn'
pod 'GooglePlayGames'
Error :
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_TyphoonAssembly", referenced from:
_OBJC_CLASS_$_AppAssembly in AppAssembly.o
"_OBJC_CLASS_$_TyphoonBlockComponentFactory", referenced from:
objc-class-ref in AppAssembly.o
"_OBJC_CLASS_$_TyphoonComponentFactory", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in UIViewController+PropertyInjector.o
objc-class-ref in ReminderViewController.o
objc-class-ref in AppAssembly+AddReminder.o
objc-class-ref in DashboardViewController.o
objc-class-ref in AppAssembly+Dashboard.o
"_OBJC_CLASS_$_TyphoonDefinition", referenced from:
objc-class-ref in AppAssembly.o
objc-class-ref in AppAssembly+ViewControllers.o
objc-class-ref in AppAssembly+Actions.o
...
"_OBJC_METACLASS_$_TyphoonAssembly", referenced from:
_OBJC_METACLASS_$_AppAssembly in AppAssembly.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What are the build configurations, architecture. I am using
cocoa pods, XCode 7.1, target iOS version is 8.4. How can I solve this build error?
Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
xcodeproj 'Proj'
pod 'KGModal'
pod 'JSONKit'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'TTTAttributedLabel'
target :Proj, :exclusive => true do
# pod 'Typhoon', :head
end
target :ProjTest, :exclusive => true do
pod 'Kiwi'
end
Podfile install output
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using Typhoon (3.4.1)
Using Bolts (1.4.0)
Using FBSDKCoreKit (4.7.1)
Using FBSDKLoginKit (4.7.1)
Using FBSDKShareKit (4.7.1)
Using JRSwizzle (1.0)
Using JSONKit (1.4)
Using KGModal (1.2.0)
Using Kiwi (2.4.0)
Using TTTAttributedLabel (1.13.4)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 9
total pods installed.
This is pod update output, There is no other errors in terminal and I added $(inherited) to linker search path
It is a basic error because your Xcode is unable to search for library you want through pod. Try the following steps before installing cocoapods:
clean your project
remove all the libraries you want to include via Cocoapods.
Add $inherited in your Linker Search Path in Build Settings.
Follow all steps of cocoapods installation as given on Cococapods.org.
check for any errors which might come in terminal.
If any error rectify them , and agin install podfile
after installing podfile clean your project again (cmd + shift + k).
Also lastly if you have done all these steps and still showing this error. check whether the libraries you are importing is getting imported via pods or manual. change them to
#import <AFNetworking/AFNetworking.h> kind.
If still getting error post a comment.
I just upgraded Facebook iOS SDK to v.4.0.1 and I got these errors:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
objc-class-ref in Controller1.o
objc-class-ref in AppDelegate.o
objc-class-ref in Controller2.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 already tried to change linkers: with -all_load I get the same error, while with -force_load it becomes "ld: file not found: -fobjc-arc". Any solutions?
I ran into the same problem. If you're adding Facebook Login to your app (which I presume you are) you also need to drag the FBSDKLoginKit.framework file into your Xcode project in addition to the FBSDKCoreKit.framework file.
The current instructions on Facebook's SDK Getting Started page forget to mention this. In version < 4 of the SDK, there was just one file to drag in to your project.
if you are trying to add it using cocoapods just add versions and it will work
change the pod file to the following:
pod 'FBSDKCoreKit', '~> 4.17.0'
pod 'FBSDKLoginKit', '~> 4.17.0'
pod 'FBSDKShareKit', '~> 4.17.0'
It really worked for Xcode 12.5.
Just added versions:
pod 'FBSDKCoreKit', '~> 11.2.1'
pod 'FBSDKLoginKit', '~> 11.2.1'
pod 'FBSDKShareKit', '~> 11.2.1'
With this option, errors appear and the project is not being built:
pod 'FBSDKCoreKit',
pod 'FBSDKLoginKit',
pod 'FBSDKShareKit',
Hi fellow overflowers,
I've been pulling my hair for more than a week on this issue now and I can't seem to find anything at all.
I don"t know why or how, but at one point my project stopped accepting more Pods, let me explain. Here is my Podfile :
platform :ios, '4.3'
pod 'SVGeocoder', :git => 'https://github.com/kirualex/SVGeocoder.git'
pod 'KALayoutHelper', :git => 'https://github.com/kirualex/KALayoutHelper.git'
pod 'SBJson', '3.1.1'
pod 'AFNetworking', '0.10.1'
pod 'SDWebImage', '2.4'
pod 'SVProgressHUD'
pod 'iActiveRecord'
Everything is working great with it, but here's the trick, as soon as I want to add a new pod (such as Flurry or Crittercism), I get the same kind of error :
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Crittercism", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm getting very frustrated with this as I'm near the end of this project and I am currently forced to import these libraries by the "dirty old way" ! Any help would be very very much appreciated !
I finally found out where the issue was, it was linked to a faulty podspec file from a library I was using (SVGeocoder, see Podfile). The podspec did not pose any problem while making a pod update although the line specifying the libraries was corrupted. I changed :
s.framework = 'CoreLocation, MapKit'
to
s.framework = 'CoreLocation', 'MapKit'
and everything is now back on track.