GooglePlus with CocoaPods linking error - ios

I added to my pod file
pod 'google-plus-ios-sdk', '1.4.1'
I did a
pod update
I imported
#import <GooglePlus/GooglePlus.h>
But if i try to
[GPPSignIn sharedInstance].clientID = kClientID;
I get this error from linker:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GPPSignIn", referenced from:
objc-class-ref in SDSocialManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

In my experience linker errors typically don't lead to a "one solution fits all", but I was able to solve this problem myself by adding ${inherited} to Other Linker Flags in Build Settings (Project Target).
Perhaps, by not having this tag, I wasn't inheriting some of the static libraries that were required by GPPSignIn.
Cheers!

Related

Swift Cocoapods with Objective-C files gives Undefined symbols

I have encountered the following error message:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_VTapManager", referenced from:
objc-class-ref in VTapManagerHelper.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Have you tried enabling dynamic frameworks? That worked for me.
To do it go to the podfile in your workspace and open it, then:
#Uncomment the next line if you're using Swift or would like to use dynamic frameworks
remove the hash here -> #use_frameworks!
It's minor, but don't forget to quit Xcode and run your yourProject.xcworkspace instead of yourProject.xcodeproj after installing CocoaPods

Undefined symbols for architecture x86_64 when using Tesseract

I am using tesseract provided by google. After following this tutorial, i finally built finish my app. However, when i run it, i run into the problem of undefined symbols. This is the error
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_G8Tesseract", 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)
How do i fix this issue? I tried searching online but none of the solutions worked for me. I tried reinstalling the pods and updating it. Then i faced this error
clang: error: no such file or directory: '/Users/admin/Desktop/tst/Pods/Target Support Files/Pods-tst/Pods-tst-dummy.m'
clang: error: no input files
When i tried redoing the project i get his error
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_G8Tesseract", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Apparently i had to add the TesseractOCR.framework separately even after using cocoa pods and disable Bitcode. This prevented the errors.
I think you should update pod version:
sudo gem install cocoapods
After this run:
pod update --verbose
Since Tesseract requires libstdc++.6.0.9.dylib (or libstdc++.6.0.9.tbd if libstdc++.6.0.9.dylib is unavailable in your current Xcode version) and CoreImage.framework you’ll need to link both of these libraries in.
In the General tab, scroll down to Linked Frameworks and Libraries.
There should be only one file here: TesseractOCR.framework, which you just added. Click the + button underneath the list. Find both libstdc++.dylib (or libstdc++.6.0.9.tbd) and CoreImage.framework and add them to your project.

Admob error compiling in swift

I have followed all the steps here manually and with pods and yet I always have a similar issue, an error like this one:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SFSafariViewController", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I added all of the frameworks manually:
AdSupport.framework
AudioToolbox.framework
AVFoundation.framework
CoreGraphics.framework
CoreTelephony.framework
EventKit.framework
EventKitUI.framework
MessageUI.framework
StoreKit.framework
SystemConfiguration.framework
including safariservices and corebluetooth
How can I solve this error?
YES problem solved when i update XCODE to the last version

iOS Facebook Login linker error

I have error messages below.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NSURLQueryItem", referenced from:
objc-class-ref in FBSDKCoreKit(FBSDKApplicationDelegate.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
What should I do?
Xcode 5.1.1
Target : iOS 7.0
Add following Framework in your project settings.
Foundation.framework
CFNetwork.framework
FBSDKCoreKit.framework
FBSDKLoginKit.framework
FBSDKShareKit.framework
I hope it's help you.

Xcode 5 Parse Framework Linker Error

When calling [Parse setApplicationId: clientKey:] from the didFinishLaunchingWithOptions: method in AppDelegate.m, I receive the following error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Parse", 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 have included all frameworks necessary for Parse as stated in Apple Mach-O Linker Error Parse. I have #import <Parse/Parse.h> at the top of AppDelegate.m. I have cleaned the build several times. Any ideas what might be causing this?
Just check all frameworks in "Link Binary With Libraries" in project's build-phase tab.

Resources