Latest Google Plus iOS SDK 1.7.1 not supporting ar

2019-01-29 12:58发布

I have the latest Google Plus iOS SDK managed by cocoapods in my project.

pod 'google-plus-ios-sdk' ~> '1.7.1' #(Also tried 1.5.1)

Simple code as:

#import <GooglePlus/GooglePlus.h>
[GPPSignIn sharedInstance].clientID = kClientID; 

I get this error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GPPSignIn", referenced from:
      objc-class-ref in GooglePlusManager.o
  "_OBJC_CLASS_$_GPPURLHandler", referenced from:
      objc-class-ref in GooglePlusManager.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 have $(inherited) and -ObjC in my Other Linker Flags. Does Google Plus iOS SDK not support x84_64 architecture at all? How do I fix this issue? Thanks

2条回答
Deceive 欺骗
2楼-- · 2019-01-29 13:47

I looked at a completely new XCode Project and copied the other linker flags to my current project and it worked.

You might need to add a list of binary libraries like here

And set the other linker flags

enter image description here

To $(inherited) -ObjC -l"c++" -l"icucore" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "CoreBluetooth" -framework "CoreData" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreText" -framework "GLKit" -framework "GoogleMaps" -framework "ImageIO" -framework "OpenGLES" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration"

查看更多
Viruses.
3楼-- · 2019-01-29 13:50

Uhm turn out I have GooglePlusManager in my test target. Remove it from the compile Sources fixed it.

查看更多
登录 后发表回答