- Home /
Building for iOS - Undefined symbols for architecture armv7
Hello, 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 already tried playing with scripting backend, architecture and target minimum iOS version in unity - no changes Then I also 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.
I use XCODe 8.1, unity 5.3.6f1.
Any suggestions?
Answer by wolodo · Dec 16, 2016 at 09:13 PM
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!
When I run the pod install without the '~> 5.1', I get the following error
[!] Unable to satisfy the following requirements:
GoogleSignIn (= 4.0.1)
required byPodfile.lock
GoogleSignIn (~> 4.0)
required byGoogle/SignIn (3.0.3)
GoogleSignIn (~> 2.2.0)
required byGooglePlayGames (5.1)
Specs satisfying the GoogleSignIn (= 4.0.1), GoogleSignIn (~> 4.0), GoogleSignIn (~> 2.2.0)
dependency were found, but they required a higher $$anonymous$$imum deployment target.
How were you able to run the pod install with the locked version?
I wrote pod file right in the unity project as mentioned above. the I just hit build (not build and run) and all dependencies were satisfied automatically during unity build. I just opened the scaffolded project using .xcworkspace file and everything was fine.