Xcode 9 _OBJC_CLASS_$_FBSDKApplicationDelegate - ios

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

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.

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.

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.

MPMusicPlayerController linker error in Xcode 5.1

My media player app was compiling fine and working seamlessly in older versions.
I upgraded my Xcode and i get the following errors
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MPMusicPlayerController", referenced from:
objc-class-ref in libvolumectrl_r.a(PlayerVolumeControl.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried the following based on my previous solutions search
Added MediaPlayer.framework in build phase link libraries
included following imports in my source files
#import <MediaPlayer/MediaPlayer.h>
#import <MediaPlayer/MPMusicPlayerController.h>
i am still unable to compile. Please let me know if there are any other missing steps
Go to the Build Settings -> Valid Architectures -> remove armv7 Architecture.
Only arm64 in Architecture.
Then clean application and build it.No any linker error come.
Please follow this steps.
Regards,
Kinjal

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