I'm currently integrating Flurry AppCircle Ads in my iPhone application with AdMob Mediation; I'm developing for iOS 6.
I've been following Flurry's integration instructions from here but in the end, the project doesn't even compile. Every needed Framework is linked along with the adapter for AdMob Mediation.
Here are the errors that are thrown:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_FlurryDataSenderBase", referenced from:
_OBJC_CLASS_$_AdLogManager in libFlurryAds.a(libFlurryAds.a-i386-master.o)
"_OBJC_CLASS_$_FlurryDataSenderBlockInfo", referenced from:
objc-class-ref in libFlurryAds.a(libFlurryAds.a-i386-master.o)
"_OBJC_CLASS_$_FlurryImpl", referenced from:
objc-class-ref in libFlurryAds.a(libFlurryAds.a-i386-master.o)
"_OBJC_CLASS_$_FlurrySharedData", referenced from:
objc-class-ref in libFlurryAds.a(libFlurryAds.a-i386-master.o)
"_OBJC_METACLASS_$_FlurryDataSenderBase", referenced from:
_OBJC_METACLASS_$_AdLogManager in libFlurryAds.a(libFlurryAds.a-i386-master.o)
ld: symbol(s) not found for architecture i386
Now I've figured on my own that these errors can be avoided and the app can be build if I remove -ObjC flag from Other Linker Flags, but this flag is crucial, otherwise AdMob Mediation throws an error in runtime when an ad is requested:
-[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0xc9cc000
Any help will be greatly appreciated.
You may already have figured this out by now, but I saw this error only when I had mismatched versions between the main Flurry SDK and the Flurry Ads SDK — specifically I added the latest version of the Ads SDK (4.2.0) to an existing project that was already using the main Flurry SDK but neglected to update the latter, so it was still on version 4.0.0.
Updating my copy of the Flurry SDK caused the linkage problems to go away.
Following up on that tip, I looked inside the 4.2.0 libFlurry.a and saw that it defines the symbols _OBJC_CLASS_$_FlurryDataSenderBlockInfo and the rest. So if you're linking against that then the symbols should be defined.
So I'd say that either:
you're not linking against libFlurry.a at all; or
you're linking against an old version of libFlurry.a.
Related
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.
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.
I have downloaded Fonemokey from Gorillalogic.com and followed the Documentation provided with it to set up the fonemonkey with my project. However when I am running the project i have got following errors
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SenTestSuite", referenced from:
objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
"_OBJC_CLASS_$_SenTestObserver", referenced from:
objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
"_OBJC_CLASS_$_SenTestLog", referenced from:
objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
ld: symbol(s) not found for architecture i386
I am using xCode 4.2 and iOS5. I have already included senTestingFramework and set the Other Linker Flages to -all_load. Can anyone help me with this?
I just got stuck with the same problem - and first I thought about blaming FoneMonkey :-)
But then I tried to just add a simple TestClass that extends SenTestCase, and that turned up with the same problem (I removed the FoneMonkeyOCUnit lib prior to that test).
So I figured the problem must be within my project setup and not FoneMonkey.
It turned out my Framework searchpath was wrong - I added this to my Framework searchpath "$(SDKROOT)/Developer/Library/Frameworks"
And now it is working in xCode - next up is to make FoneMonkey work from Jenkins.
I get the following error when trying to compile my project in xcode 4 (worked fine in xcode 3.x)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in View1Controls.o
"_OBJC_CLASS_$_FBLoginDialog", referenced from:
objc-class-ref in View1Controls.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in View1Controls.o
"_OBJC_CLASS_$_FBStreamDialog", referenced from:
objc-class-ref in View1Controls.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Can anyone explain whats wrong? I'm sure I've correctly imported the header files..
Thanks,
Jack
Assuming the libraries with these functions are included in the Xcode project, this error occurs when the libraries are not linked with the binary executable file. This can happen when upgrading an older project to a newer version of Xcode.
To fix it navigate to the project overview in Xcode. Click on the target. Click on Build Phases. Expand the "Link Binary With Libraries" list. If libraries are not listed, click the "+", and add the appropriate libraries.
You are missing a library/framework which caused the linker errors that you see. I'm not sure which framework is associated with Facebook functionality, it might be the general network related one. Let me see if I can find out which you need.
EDIT: Do you have the Foundation framework included with your project? Does the Facebook site maybe mention which one you need?
I don't work with facebook, but here's my thoughts:
That's a linker error, not a compiler one (which it would be if the header weren't imported). Have you imported the correct framework? And ensured XCode is telling the compiler to link to the correct library?
Its related to linker error. So just remove facebook framework from project and drag new one.
Remove existing facebook framework
Drag FacebookSDK.framework folder from the SDK installation folder into the Frameworks section of your project
I just installed Xcode 4 and am getting this error in my project:
ld: warning: directory not found for option '-LDebug-iphonesimulator4.3'
ld: warning: ignoring file /Developer/Projects/BuildOutput/Release-iphoneos/libMyFramework.a, missing required architecture i386 in file
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MyRandomNumber", referenced from:
objc-class-ref in myAppDelegate.o
objc-class-ref in RootViewController.o
I have the project set to iOS 4.3 Simulator. I did check that scheme and it is set to debug build configuration. Why does it reference a Release version of the above library?
Also, what is the i386 error about?
I'm seeing this type of error as well. The odd part is that I've been building, linking, and running successfully under the Simulator. I just now tried to fire my app up in my iPhone, and am totally bombing out during the link process.
I've run my app on my iPhone before. I've been building it under Xcode 3.2.x for the last year, and have never seen this problem.
A couple of other SO threads indicate that it could be due to copying a framework into the project folder, and that one should just "move the framework." Okay. Where, and how do I let Xcode know where it is? And if that's not the problem, then what is?
Xcode 4 has a ton of promise, but it is a sore pain in the ass sometimes....