Adding Stripe Pod- linker error - ios

The pod was installed properly. I also tried a clean/build multiple times. My header files are included in the bridging header.
My architectures include arm64 but I'm still receiving this error.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Stripe", referenced from:
__TMaCSo6Stripe in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Actually when I ran pod install, it didn't inherit my path in
OTHER LINKER FLAGS
so it was a manual fix by adding
$(inherited)
Hope this helps someone if they encounter the same problem.

I just integrated the Stripe cocoapod yesterday and had quite a few issues myself. I'm guessing in your Stripe/Support Files in your Pods directory, you have a file called Stripe-umbrella.h.
The only luck I had integrating Stripe was importing the umbrella file in my bridging header like below (make sure to remove quotes):
#import <Stripe/Stripe-umbrella.h>
Add this, clean, build and you should have better luck.
For the record, I'm using XCode7.

Related

Adding Firebase Framework to iOS Undefined symbols

I am trying to add Firebase Messaging to my iOS Project. I can't use Pods because something with them is broken on my Developermachine. So I am adding the Framework manually. As mentioned by the Readme I added all Frameworks of the Analytics and Messaging Folders along with the Firebase.h to my Xcode Project. I added Storekit.framework, libz, libc++ and libsqlite3.0 as mentioned on other Stackoverflow Questions to get rid of the most linker errors. But still I can't compile/link my project because of the following errors:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAInAppPurchaseTransactionReporter_ca1fe3eb82b823d5f96d3f8b4baedc9c.o)
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAProductsRequest_8f770071350872416d311668917f3a41.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't get why they are missing or which library I need to add to make this run. Does someone know what to do ?
And I should also mention that I am using Qt on this project.
Thanks in advance,
I had the same issue.
I don't know why this framework is required, but i added StoreKit.framework to Linked Frameworks and Libraries which made it compile.
Hope it helps! 👍
You can try go to the entry header file of your project then add
#import "Firebase.h"
to see if problem is solved.

Xcode 9 _OBJC_CLASS_$_FBSDKApplicationDelegate

I'm trying to implement Facebook SDK into my project and I get the same issue
Facebook sdk is not a dylib error after update update Xcode 7?
Well, I have Bolts in my Frameworks Directory, also
In my Build Settings:
Frameworks Search Path: ~/Documents/Frameworks/FacebookSDKs-iOS-4.27.0
(That is correct for my path)
In my Briding-Header.h
#import <Bolts/Bolts.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
But, I'm still getting the same error, also, I just deleted the Derived data.
The error is:
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKCoreKit.framework/FBSDKCoreKit', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKCoreKit.framework/FBSDKCoreKit is not a dylib
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/Bolts.framework/Bolts', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/Bolts.framework/Bolts is not a dylib
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKLoginKit.framework/FBSDKLoginKit', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKLoginKit.framework/FBSDKLoginKit is not a dylib
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Some one has an idea about this error?
Well, the solution was weird, basically, I removed the Drag and Drop to my Framework group, and I added the FBSDKCoreKit, FBSDKLoginKit and Bolt using the general settings adding them in Linked Frameworks and Libraries
I also got this error and cleaning the project and building it again 4-5 times worked for me.
Cleaning - Command + Shift + K
Building - Command + B
Another solution is to delete these files in the project folder:enter image description here
pod install
instead of using the method described in FB official reference, I used pods to install them and I easily got rid of this problem

Apple Mach-O Linker Error with project from GitHub

I'm attempting to run a project from git hub (https://github.com/dulaccc/DPMeterView). The issue arises after cloning the repository and using 'pod install' to install the dependencies. I'm receiving this error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_DPMeterView", 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)
I'm having a tough time finding a solution. Any thoughts? Thanks in advance!
Since the obvious solution hasn't been written as an answer, I will do that.
Anytime you get an "undefined symbol" error, that indicates that you have not told the linker to add that symbol to your binary. How do you tell the linker to add it? Well, perhaps the easiest way is to tell the compiler to build your source file.
In Xcode, this is done in the Compile Sources pane, which looks like this:
On the command line, you can do it like this:
clang source1.c source2.c source3.c etc.c
For https://github.com/dulaccc/DPMeterView,
The example project is missing $(inherited) under "Other Linker Flags"
Once you add $(inherited), run pod install and it should compile afterwards.

Undefined symbols for architecture x86_64 iOS swift

I am working on a project with the Swift programming language and I am trying to use some code from some older Objective-c projects. I have created the bridge file and imported the headers that I need but I get the following error, which I know it has to do with linking some framework, but even when I added CoreGraphics as an added framework it still appears. Any ideas?
Undefined symbols for architecture x86_64:
"_CGPointMake", referenced from:
_CGPointAdd in SKActionEffects-669E235BD7235D6A.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks
UPDATE: setting the BaseSDK did not do the trick. This is what my build settings are like with xcode6.
Check if the "Target Membership" of your files are appropriate.
I don't think that adding a class to test target just to test it is a good idea. In my case checking "Allow testing Host Application APIs" made a difference.

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

Resources