Reachability error in integration of admob - iphone

I am trying to integrate admob in my ios application but I am getting following errors when I add sdk and build it.
Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithName", referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[GADNetworkChecker stopNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.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 included all required framework including SystemConfiguration, CFNetwork etc.
Update
I am getting this error when I build in simulator but not when I build with device. is it sdk issue? I am using simulator 5.1.

Make sure that the frameworks that you added are correctly linked under the "Link Binary With Libraries" section of your Build Settings. Also, look at "Compile Sources" under "Build Phases" to make sure all of the relevant files you want to compile are there.

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.

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

EGOTableViewPullRefresh - Unable to build due to linking issues

I am trying to use EGOTableViewPullRefresh in my ios6 project but I can't get past a linking issue when building. After including the source to my project, adding -fno-objc-arc flag to the EGORefreshTableHeaderView.m and then making all of the necessary changes to the source so that I can build with ARC (removing 'release' etc) I am running into the following linking issues:
Undefined symbols for architecture i386:
"_CATransform3DIdentity", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView.o
"_CATransform3DMakeRotation", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView.o
"_OBJC_CLASS_$_CALayer", referenced from:
objc-class-ref in EGORefreshTableHeaderView.o
"_OBJC_CLASS_$_CATransaction", referenced from:
objc-class-ref in EGORefreshTableHeaderView.o
"_kCAGravityResizeAspect", referenced from:
-[EGORefreshTableHeaderView initWithFrame:arrowImageName:textColor:] in EGORefreshTableHeaderView.o
"_kCATransactionDisableActions", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Has anyone run into this problem using EGOTableViewPullRefresh?
Thanks!
You do need the QuartzCore library framework to be included for pull-to-refresh to link properly.
This is achieved by going to your Target page (click your target icon on the left column at the top of Xcode layout), select the "Build Phases" tab, click to open "Link Binary with Libraries" then click the '+' button, begin to type "QuartzCore" and select the QuartzCore framework.
That should fix these link errors for you.
Make sure you have the QuartzCore framework added.

Why is CoreData not linking in my ported iOS->Mac App?

I'm porting an app from the iOS side to the Mac side and I'm having an annoying linking error where the linker appears to be trying to use the iOS version of the coredata framework instead of the (x86_64) one. I've deleted the framework and re-added it and know I'm adding the mac version. I've also regenerated my model classes. I'm getting this error:
ld: warning: ignoring file /Users/xxxxx/xcode_projects/xxxxx/CoreData.framework/CoreData, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"_NSSQLiteStoreType", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSInferMappingModelAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSMigratePersistentStoresAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in CoreDataSingleton.o
etc...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions would be helpful, thanks,
Nick
Link errors usually mean you aren't including a framework in the project.
In the "Link Binary With Libraries" section of the "Build Phases" tab of the build settings for your project, make sure CoreData.framework is listed. If not, press the "+" button and select it.

Simple Torch Application in XCode

I am trying to build a simple torch application for iOS 5 as described in http://developer.apple.com/library/mac/releasenotes/AudioVideo/RN-AVFoundation/_index.html#//apple_ref/doc/uid/TP40010717-CH1-DontLinkElementID_17 but i am getting "Apple Match-O Linker Error:
Undefined symbols for architecture armv7:
"_AVMediaTypeVideo", referenced from:
-[FirstViewController viewDidLoad] in FirstViewController.o
"_OBJC_CLASS_$_AVCaptureDevice", referenced from:
objc-class-ref in FirstViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help appreciated
Anybody ?
Additionally: it only happens when running the project, no errors if i just clean & Build, and the code completion detects the library.
Thanks
You might need to link your project with the AVFoundation framework first.
If you're already doing that, make sure you're building for armv7 and not just armv6.
Check it in your project settings > Target > Build Settings > Architecture
As simple as this:
Linker errors like this indicate that a symbol is missing when the app is being linked. Most system symbols like these, come from system frameworks. So, I was missing a framework in my project that contains AVCaptureDevice and AVMediaTypeVideo.
To solve it, i just added the AVFoundation framework following this tutorial: http://www.thinketg.com/Company/Blogs/11-03-20/Xcode_4_Tips_Adding_frameworks_to_your_project.aspx
Now it runs !