iPhone - How to add AdSupport.framework in ios? - iphone

I am trying to use the AdMob in my test application when I rum my application i am getting the following error as shown below.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADIdentifierUtilities.o)
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I googled around this errors and everyone telling to add the AdSupport.framework. But when I try to add that framework in my Xcode4.1 and Xcode4.4 there is no AdSupport.framework is not missing. Where can I get it and how to add that framework.

AdSupport.framework available only in iOS6+, so you won't be able to find it in XCode version prior to 4.5
UPD:
According to AdMob 6.2.0 changelog:
Required to use Xcode 4.5 and build against iOS 6. The minimum deployment is iOS 4.3.

Related

Undefined symbols for architecture i386: Facebook Audience Network (help needed!)

I've read close to 50 threads on here, regarding linking frameworks to an Xcode project, but I've yet to find one that covers an issue I'm having with Facebook's Audience Network framework.
I'm using Xcode 4.2.3 (I'm on an old mac with OS X Lion - don't ask!), building for iOS 6.1, using Facebook SDK 3.2.1.
I'm trying to test banner ad formats within specific view controllers, however, getting an error every time I build the code, based exactly on the tutorials, even Facebook's sample code isn't compiling. I've added FBAudienceNetwork.framework to almost every folder on my machine, added via dragging and dropping, and via the Link Binary with Libraries option. I've tried to changing the Framework Search paths, to no avail.
I'm using the following frameworks: AdSupport, StoreKit, CoreMotion, UIKit, Foundation, CoreGraphics
Getting the following error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CAShapeLayer", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdChoicesView.o)
"_OBJC_CLASS_$_CATransaction", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
objc-class-ref in FBAudienceNetwork(FBAdMediumRectangleView.o)
"_OBJC_CLASS_$_NSURLSession", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
"_kCATransactionDisableActions", referenced from:
-[FBAdMediumRectangleView updateViewForSize:view:] in FBAudienceNetwork(FBAdMediumRectangleView.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions?
UPDATE: Added in Quartzcore.framework, and errors now reduced to;
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NSURLSession", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've made Foundation.framework optional. Build settings armv7, armv7s, iOS 6.1, Simulator only. Build Active Architecture ONLY Yes/No.
I'm a software engineer on the Audience Network team at Facebook, and I have some suggestions that may help.
Try adding "QuartzCore.framework" to your target. That should resolve the _OBJC_CLASS_$_CA* linker errors. Classes with a "CA" prefix are part of QuartzCore/Core Animation.
If the "_OBJC_CLASS_$_NSURLSession" error still appears, try weak-linking the Foundation framework by setting the "Foundation.framework" to "optional" in Build Phases, Link Binary With Libraries.
You should be able to successfully build after those steps. Hope that helps!
NSURLSession was added in iOS 7.0. Any improper reference to it in your app will cause this problem when ran on a device with iOS 6.0. You need to use proper techniques to ensure the class is never referenced under iOS 6.0 or make your deployment target iOS 7.0.

Upgrade from Facebook iOS SDK 3.2.1 to 3.5 gave me an error with FBCrypto

After installing the new sdk I cleaned the project and build it. It fails with this message:
Undefined symbols for architecture i386:
"_SecRandomCopyBytes", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
"_kSecRandomDefault", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Same problem anyone? Solutions?
Well, you need to include the security framework and the libsqlite3.dylib as stated here.
It works now.
edit
Also found this now...
Jumping on this, im running into the same issue, I saw that the FBSDK needs the Security, AdSupport, etc. Here's my linked libraries:
My error is the same:
Undefined symbols for architecture i386:
"_SecRandomCopyBytes", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
"_kSecRandomDefault", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
All the other framework dependencies are good to go as far as I can tell. A Vlean->Build didn't fix it either. Thanks.
Edit: Got it. I needed to re Add Files to Project and check the Add to Target button.. basically XCode automagicka

Getting "_OBJC_CLASS_$_NgnEngine" error after linking iOS fat library

Why i am still getting this error even after linking fat library
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NgnEngine", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and linking everything in "User-Defined
I am following the instruction which written here Link ios-ngn-stak to your app
any help please, this is tiring me and it is my senior project
please refer this two link for getting solution if your issue:-
Error : "_OBJC_CLASS_$_NgnEngine"
Xcode with iOS - Creating a library in a way that is easy to run in debug mode, distribute, iterate

iOS application is not working on xCode with iOS 5.1

I am developing a application in iOS which compile on iOS 5.0 perfectly .But Unable to compile on xCode on iOS 5.1 .The fallowing problem is arising.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SenTestCase", referenced from:
_OBJC_CLASS_$_RFAPITests in RFAPITests.o
"_OBJC_METACLASS_$_SenTestCase", referenced from:
_OBJC_METACLASS_$_RFAPITests in RFAPITests.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is a linker problem. The code or library that defines SenTestCase needs to be added to the appropriate compile or link phase for your target depending on whether it's in source or binary form.

route-me won't compile in xCode 4

I'm trying to get route-me offline maps to compile in xCode 4. They were fine in xCode 3.
I believe my issue is with architecture settings. Looking at the following post, it looks like I should change proj4 to be armv6 only and leave the main project and mapview at standard (v6 & v7).
However, I still get the following errors:
Undefined symbols for architecture armv6:
"_OBJC_CLASS_$_RMMarker", referenced from: objc-class-ref in OSMapViewController.o
"_OBJC_CLASS_$_RMDBMapSource", referenced from: objc-class-ref in OSMapViewController.o
"_OBJC_CLASS_$_RMMapContents", referenced from: objc-class-ref in OSMapViewController.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status
Any help would be warmly welcomed.
Chris.
It seems to be a bug in XCode.
I downloaded xcode 4.0.2 and it compiles and works without any error or warnings!!
Update your xcode.