After integration of GoogleSignIn sdk, i am getting the following link error -
Undefined symbols for architecture i386: "_OBJC_CLASS_$_GIDSignIn", referenced from: objc-class-ref in xxx.o objc-class-ref in xxx.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried the following setting changes but still the issue persists 1. framework search path, library search path = $(inherited) other linker flag = -ObjC 2. Added SafarServices.framework, security.framework, systemconfiguration.framework, addressbook.framework, libz.dylib 3. build active architecture only = false 4. valid architectures = (armv7, arm64, i386, x86_64)
The problem is the binary is getting created with i386, x86_64 architecture after checking with lipo -info command but still this linking coming.
Any help is really appreciated.
Try manual integration instead of CocoaPods. It's not difficult and can be more reliable for binary dependencies in my experience.
Add the SDK your Xcode project
1 Extract the SDK archive you downloaded and copy the following files to your Xcode project:
GoogleSignIn.bundle GoogleSignIn.framework GoogleSignInDependencies.framework
2 Add
GoogleSignIn.bundle
to your Xcode project's Copy Bundle Resources build phase.Link dependent frameworks to your Xcode project
1 Link the following frameworks to your Xcode project:
SafariServices.framework SystemConfiguration.framework
2 Add the ObjC linker flag to the app target's build settings:
- Other Linker Flags:
$(OTHER_LDFLAGS) -ObjC
This should get you at least far enough to build. Also try cleaning your DerivedData
folder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.