Adding Firebase Framework to iOS Undefined symbols - ios

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.

Related

Adding Stripe Pod- linker error

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.

Facebook SDK is not a dylib

I am attempting to build a project I did not write, and I keep reaching this error:
ld: warning: Auto-Linking supplied '/Users/my_user_name/Documents/FacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit', framework linker option at /Users/my_user_name/Documents/FacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit is not a dylib
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBSDKAppEvents", referenced from:
objc-class-ref in AppDelegate.o
"_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)
This is a new error since updating Parse and Bolts pods. Other solutions for Auto-Linking that I've seen on here have not been able to help, but since the update to Facebook SDK is new perhaps someone has already solved this issue.
It's because of the conflict between the reference of FB SDK located at /Users/my_user_name/Documents/ and the one in CocoaPods.
Originally I used FB SDK located at /Users/my_user_name/Documents/ as suggested in FB SDK Getting Started tutorial. Then switched to Cocoapods after I started using react-native.
The solution is to remove Facebook SDK references from your apps Frameworks folder in YourApp.xcodeproj. I have explained more at https://stackoverflow.com/a/36947791/556678.
Make sure you're using a current version of the FBSDK! Also make sure you followed THESE (new) instructions: https://parse.com/docs/ios/guide#users-facebook-users (because with the parse update different things must be done!).
If the problem persists, I suggest you build a new project (that follows the instructions in the previous link).

google admob undefined symbol for architecture armv7

i have replaced older version of admob 6.6.1 with latest admob library version 6.12.0 but i get this error although every thing is fine. I am using xcode 6.0.1, how to resolve this issue, any help?
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_EKEvent", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_OBJC_CLASS_$_EKEventEditViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had same issue but i solved by adding eventKit and eventUIKit framework into my project. Hope it will work for you too.
This error is mostly because update of your ADMOB SDK.
1) Go to build phases->Open list of frameworks.
2) Locate libGoogleAdMobAds.a. Remove this file by pressing - sign.
3) Again add this libGoogleAdMobAds.a file back by pressing + sign and selecting "Add other". select this file from ADMOB folder of your project.
4) Clean, then build and run your project.
Also, check you have -ObjC set to Other Linker Flags in your project's target build settings and required frameworks are added.
add Framework EventKit and EventKitUI.

Archiving fails due to undefined Symbols for Google Analytics

I have integrated GAI using the most recent cocoapods version.
When I build in the Debug config everything runs just fine.
However, as soon as I try to archive the Application the compiler fails with the following messages:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GAIDictionaryBuilder", referenced from:
objc-class-ref in libWLCore.a(WLTrackingHelper.o)
"_OBJC_CLASS_$_GAI", referenced from:
objc-class-ref in libWLCore.a(WLTrackingHelper.o)
"_kGAIScreenName", referenced from:
+[WLTrackingHelper trackView:] in libWLCore.a(WLTrackingHelper.o)
+[WLTrackingHelper resetView] in libWLCore.a(WLTrackingHelper.o)
"_kGAIAnonymizeIp", referenced from:
+[WLTrackingHelper prepareDefaultTracker:withAnonymization:withUnCaughtExceptions:withDebug:] in libWLCore.a(WLTrackingHelper.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Since it works in Debug I tried to figure out where the difference in the configuration between Debug and Release lies.
I found out that the Other linker flags in Release are empty whereas in Debug contains the flag for GoogleAnalytics and other frameworks and libraries.
After adding the flags to the Release Configuration of Other linker flags I got
library not found for -lGoogleAnalyticsServices
After that, I added libPods and after that libPods-GoogleAnalytics to the Link Binary With Libraries section but the errors remained the same.
I invested almost 2 days into that problem, but I could not find any solution.
After some fiddling I found the solution by adding not the library generated by cocoa pods (libPods-GoogleAnalytics), but directly linking the libGoogleAnalyticsServices to my main project. Still, I think this is not the most elegant solution possible since the linker should know that the symbols he was missing were available already, as provided by cocoapods.
Please confirm you have added $(inherited) to Other Linker Flags (Build Settings) as in the below image. Add the same in Release also, otherwise the same error will pop up at the time of archiving.

build error while add revmob ad in iOS app

I want to add RevMob add in my app but there are some errors
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in RevMobAds(RevMobStoreController.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.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 added StoreKit,SystemConfiguration and RevMob Frameworks already.
I am using Xcode4.3 and ios4.2
Plz help me.
Thanks in advance.
You need to add the StoreKit framework
EDIT: I see now what you mean, there was an issue with the older versions, I'm adding a link to an edited framework to solve that issue: Edited Revmob Framework
You must link against StoreKit.framework
It looks like the ad sdk you have now does not include support for use with the simulator.
-[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o)
ld: symbol(s) not found for architecture i386
if you get anything that mentions "not found for architecture" means revmob didnt include classes for running on simulator. You have 2 choices. look for a missing library ".a file" or only compile for testing on a device.
I've ran into an issue with the new ios6 where revmob did not support the new iphone 5 armv7s architecture.
Double check your revmob installation or try compiling to your phone instead of the simulator
When your are dropping the files manually in xcode the files are not copied to Bundle. So "SKStoreProductViewController.m" was the file not copied in the bundle so the error occurred. To resolve the error. Drag the files only .m files to Copy Bundle Resourceas shown in the image
This error can also happen if you removed a file from your project and subsequently re-created it. Sometimes Xcode doesn't automatically re-include it in the 'compile sources' box (when you click on target).
Check the box and see if all of your source files are included, if not then drag them in and rebuild.
They release a new SDK version (4.6.0) that works perfectly on older Xcode versions!
This also happens with Appirater. I was getting this message:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_SKStoreProductViewController", referenced from: objc-class-ref in Appirater.o "_SKStoreProductParameterITunesItemIdentifier", referenced from: +[Appirater rateApp] in Appirater.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
---To Fix---
add StoreKit.framwork in --> BuildPhases
---Under-> Link Libraries with Libraries
If you have more than one target you might need to add the
StoreKit.framwork to both Targets.
I faced similar issue and after long search and checking sample RevMob code, i found this solution, may be help others:
Under project target, select Build Settings, under Deployment, check iOS Deployment Target, change the value to 'iOS 9.0' or higher.
I hope this help.

Resources