XCODE, building for iOS - undefined symbols for architecture armv7 - ios

looks like I am not the first, who is asking about this issue but I need to try. Does anybody encountered this problem?
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
objc-class-ref in gpg(GPGClearcutLogger.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
objc-class-ref in gpg(GIPNetworkImage.o)
"_GTMMethodCheckMethodChecker", referenced from:
+[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString32] in libGoogleToolboxForMac.a(GTMNSDictionary+URLArguments.o)
+[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString33] in libGoogleToolboxForMac.a(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)
It looks like, some Google Play dependency is causing it, if I got it right. I tried to switch some values in XCODE recommended in other threads with similar issue. Namely build settings -> architectures, valid architectures, supported platforms, base sdk, active architecture only. Also no changes, still the same error during linking. cocoapods are installed
I use XCODe 8.1.
Any suggestions?

I managed to solve it by myself. The key is to edit the pod file like this (tested with the unity 5.3.6f1, GPG games plugin 0.9.34 and xcode 8.1):
platform :ios, '8.0'
target 'Unity-iPhone' do
pod 'GooglePlayGames', '5.1'
end
then you need to run pod install and it works!

Related

FirebaseCrashlytics and FirebaseAnalytics pod installation is failing

In migrating my Fabric/Crashlytics SDK into FirebaseCrashlytics, I've decided to integrate cocoapods.
After adding FirebaseCrashlytics and FirebaseAnalytics into the Podfile, I am getting this error when I compile and I can't figure out why it is happening:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GSDK_GTMLogger", referenced from:
objc-class-ref in GoogleIPhoneUtilities(GIPReachability.o)
"_kFirebaseCloudMessagingErrorDomain", referenced from:
-[FIRMessaging(FIRApp) configureMessaging:] in FirebaseMessaging(FIRMessaging+FIRApp_ed2c92d2ac2b5969ab6c5684759ab5bd.o)
-[FIRMessaging(FIRApp) exitApp:withError:] in FirebaseMessaging(FIRMessaging+FIRApp_ed2c92d2ac2b5969ab6c5684759ab5bd.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 am I missing?
EDIT: - I've fixed the second issue with FirebaseMessaging, for the life of me, I can't figure out why I'm having issues with this:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GSDK_GTMLogger", referenced from:
objc-class-ref in GoogleIPhoneUtilities(GIPReachability.o)
All of the Firebase Repos I'm using are currently now set up via Cocoapods.
It looks like the app is linking a very old copy of FirebaseMessaging and some of its dependencies with recent versions of Analytics and Crashlytics.
Since Firebase libraries share dependencies, it is not likely to work to mix incompatible versions or installation methods.
Something with linking... Looks like the wrong podfile configuration. Make sure that you add target pods to the needed App target correctly.

Adding third party library sqlcipher in ios

I am trying to integrate SQLCipher in one of my existing project with deployment target 6.0 but since sqlcipher supports 9.0 as its minimum deployment target ,so I changed the deployment target to 9.0 now.
With this I made a change in build setting also,I changed "Build active architecture only" to yes.I tried building the app then.But it shows few errors related to already existing classes.
Error-"Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ConditionViewController", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)".
Valid Architecture- armv7 arm64
I am not able to figure out this error and fix it.Kindly help me to resolve it.Any help would be appreciated.

Building Sinch from CocoaPods

Has any tried building the latest Sinch (sinch.com) SDK through Cocoapods? Version 3.0.0.
I'm getting the following:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SINOutgoingMessage", referenced from:
objc-class-ref in MessageThreadViewController.o
"_OBJC_CLASS_$_Sinch", referenced from:
objc-class-ref in SinchClient.o
(maybe you meant: _OBJC_CLASS_$_SinchClient)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And wondering if anyone knows the fix?
Thanks!
Charlie
Update, we have now released arm64 build so for new projects you should not have to change archs anymore.
Update you pods build settings and you should be fine.
Christan
You do not have to do the things belove anymore. It is fixed by Sinch. Check the cjensen's answer.
In here there is an official tutorail from Sinch and it says
Try removing i386 from Architectures and run again.

building TestFlightSDK with cocoapods

I seem to be getting the error message while trying to compile TestFlightSDK in my app via cocoapods
Im my Podfile i have the line:
pod 'TestFlightSDK'
And the pod update works fine.
When i try and compile the app i get the message:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TestFlight", referenced from:
objc-class-ref in OurDealAppDelegate_iPhone.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
my app is only supporting Architecture armv7 (because if i add armv7s or arm64 older libraries fail to compile - so i assume its something to do with this.
Is there any work around for this?
Okay, you need to confirm whether Cocoapods has included libTestFlight.a library in your project. Cocoapods has never added the library for me.
So, please follow the steps below:
Open the Pods-TestFlightSDK target in the Pods.xcodeproj project
Open Build Phases tab and add libTestFlight.a
libTestFlight.a can be found at [$SRCROOT]/Pods/TestFlightsSDK

Archiving fails due to undefined Symbols for Google Analytics

I have integrated GAI using the most recent cocoapods version.
When I build in the Debug config everything runs just fine.
However, as soon as I try to archive the Application the compiler fails with the following messages:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GAIDictionaryBuilder", referenced from:
objc-class-ref in libWLCore.a(WLTrackingHelper.o)
"_OBJC_CLASS_$_GAI", referenced from:
objc-class-ref in libWLCore.a(WLTrackingHelper.o)
"_kGAIScreenName", referenced from:
+[WLTrackingHelper trackView:] in libWLCore.a(WLTrackingHelper.o)
+[WLTrackingHelper resetView] in libWLCore.a(WLTrackingHelper.o)
"_kGAIAnonymizeIp", referenced from:
+[WLTrackingHelper prepareDefaultTracker:withAnonymization:withUnCaughtExceptions:withDebug:] in libWLCore.a(WLTrackingHelper.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Since it works in Debug I tried to figure out where the difference in the configuration between Debug and Release lies.
I found out that the Other linker flags in Release are empty whereas in Debug contains the flag for GoogleAnalytics and other frameworks and libraries.
After adding the flags to the Release Configuration of Other linker flags I got
library not found for -lGoogleAnalyticsServices
After that, I added libPods and after that libPods-GoogleAnalytics to the Link Binary With Libraries section but the errors remained the same.
I invested almost 2 days into that problem, but I could not find any solution.
After some fiddling I found the solution by adding not the library generated by cocoa pods (libPods-GoogleAnalytics), but directly linking the libGoogleAnalyticsServices to my main project. Still, I think this is not the most elegant solution possible since the linker should know that the symbols he was missing were available already, as provided by cocoapods.
Please confirm you have added $(inherited) to Other Linker Flags (Build Settings) as in the below image. Add the same in Release also, otherwise the same error will pop up at the time of archiving.

Resources