FBAudienceNetwork v4.1.0 Build Error - ios

I tried to include FBAudienceNetwork.framework because i want to display banner/interstitial ad unit in my app. But my app gave me several errors.
Error
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_CIContext", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
"_OBJC_CLASS_$_CIFilter", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdBlurredImageView.o)
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
"_kCIInputImageKey", referenced from:
___65-[FBAdBlurredImageView sliceImage:withAspectRatioInfo:withBlock:] _block_invoke42 in FBAudienceNetwork(FBAdBlurredImageView.o)
+[FBAdUtility(FBAdViewUtility) blurImage:withRadius:] in FBAudienceNetwork(FBAdUtility.o)
"_OBJC_CLASS_$_EAGLContext", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
"_kCIContextWorkingColorSpace", referenced from:
+[FBAdUtility(FBAdViewUtility) blurImage:withRadius:] in FBAudienceNetwork(FBAdUtility.o)
"_kCIInputScaleKey", referenced from:
___65-[FBAdBlurredImageView sliceImage:withAspectRatioInfo:withBlock:] _block_invoke42 in FBAudienceNetwork(FBAdBlurredImageView.o)
"_OBJC_CLASS_$_CIImage", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdBlurredImageView.o)
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Framework
- MediaPlayer
- CoreMedia
- SystemConfiguration
- CoreTelephony
- AVFoundation
- StoreKit
- CoreMotion
- AdSupport
- Foundation
- CoreGraphics
- UIKit
- libc++.dylib
- libz.dylib
Setting
Architecture : $(ARCHS_STANDARD_INCLUDING_64_BIT)
Deployment Target : 7.0
FBAudienceNetwork version : v4.1.0
Additionally,
Do I need to include Bolts.framework for using just Audience Network?
After including it, errors are gone.
So I wonder if Bolts.framework is needed.
(When I use FBAudienceNetwork v3.23, these error were not occurred)

I found out the solution.
I just changed my project setting.
Apple LLVM 6.0 - Language - Modules
: Enable Modules (C and Objective-C) => YES
I hope this will be helpful for developers to use facebook's audience network.

It seems that your FBAudienceNetwork v4.1.0 doesn't support armv7 architecture. If that library is static - use Lipo or another tool to create a library file (.a) which support this architecture too. If this library isn't static - just add armv7 in its project file (FBAudienceNetwork.xcodeProj > Build Settings > Architecture).

Related

Apple Mach-O for libAppLovinSdk.a in cocos2d for iPhone

I am trying to display AppLovin sdk in my cocos2d project in Xcode and I'm currently unable to debug this Apple Mach-O error as described below.
Undefined symbols for architecture i386:
"_CMTimeGetSeconds", referenced from:
-[ALVideoViewController timeLeft] in libAppLovinSdk.a(ALVideoViewController.o)
-[ALVideoViewController percentViewed] in libAppLovinSdk.a(ALVideoViewController.o)
"_CMTimeMakeWithSeconds", referenced from:
-[ALVideoViewController createCountdownTimeObserver] in libAppLovinSdk.a(ALVideoViewController.o)
"_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
"_MPMoviePlayerPlaybackDidFinishReasonUserInfoKey", referenced from:
___53-[ALInterstitialViewController moviePlayerDidFinish:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
"_MPMoviePlayerPlaybackStateDidChangeNotification", referenced from:
___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
"_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
objc-class-ref in libAppLovinSdk.a(ALInterstitialViewController.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I went to build phases -> add other -> Selected libAppLovinSdk.a file from the finder displayed.
I also set the value of Build Active Architectures only to NO and removed arm64 from architectures. There is no i386 architecture.
You are missing the CoreMedia and MediaPlayer frameworks.
(I found this out by Googling for CMTimeGetSeconds and MPMoviePlayerPlaybackDidFinishNotification and seeing what section of the Apple docs got hits, however the CM and MP prefixes should be enough to tell you).

Metaio SDK - XCode 6 Mach-O Linker Error

I have a metaio project for iOS that was working just fine with XCode 5. Since switching to XCode 6 for testing with iOS8 I've ran into the problem of 6 new Mach-O linker errors
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_EKEventEditViewController", referenced from:
objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
"_OBJC_CLASS_$_EKEvent", referenced from:
objc-class-ref in metaioSDK(xhvNiLkUYIhedEvQjYEaAfH)
objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
"_OBJC_METACLASS_$_MPMoviePlayerViewController", referenced from:
_OBJC_METACLASS_$_ASMoviePlayerViewController in metaioSDK(ASMoviePlayerViewController.o)
_OBJC_METACLASS_$_MoviePlayerViewController in metaioSDK(MoviePlayerViewController.o)
"_OBJC_CLASS_$_EKEventStore", referenced from:
objc-class-ref in metaioSDK(xhvNiLkUYIhedEvQjYEaAfH)
objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
"_OBJC_CLASS_$_MPMoviePlayerViewController", referenced from:
_OBJC_CLASS_$_ASMoviePlayerViewController in metaioSDK(ASMoviePlayerViewController.o)
_OBJC_CLASS_$_MoviePlayerViewController in metaioSDK(MoviePlayerViewController.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The solution for me was to add three new frameworks to my build phases.
Navigate to build phases
Add the following new frameworks
MediaPlayer
EventKitUI
EventKit
Done...

Include WebRTC in iOS project

I trying to deal with the AppRTCDemo projet but I am getting error.
Which library I forget to include ?
Log error :
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_RTCVideoRenderer", referenced from:
objc-class-ref in VideoView.o
"_OBJC_CLASS_$_RTCSessionDescription", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RTCICECandidate", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RTCVideoCapturer", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RTCPair", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RTCMediaConstraints", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RTCPeerConnectionFactory", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RTCICEServer", referenced from:
objc-class-ref in APPRTCAppClient.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks
The solution is to set the "Other Linker Flags" in the build setting of your project to $(inherited).
Then it will be an inherited link options from the workspace.
Maybe this library isn't built for armv7s processors.
Is it static lib built in .a file?
If so, you can run in console lipo -info command to see what architectures is this library built for.
For example, this command for some library somelib.a lipo -info somelib.a gives output:
Architectures in the fat file: somelib.a are: armv7 i386
If armv7s architecture isn't supported, but armv7 is, you can also run your project, try setting this in your build options:
"Build Active Architecture Only" YES --> NO.
You may be testing on iPhone 5 or above which is on armv7s architecture (see http://iossupportmatrix.com/ for more info).
The AppRTCDemo was built on armv7, that assume to run it on devices issued between the iPhone 3GS and the iPad mini (that includes iPhone 4 and 4s).
Regards,
S.
you have to run the app in ios device....not in simulator

how to integrate AdMob in iPhone application

I want to implement AdMob functionality in current project. I am getting some issues to implement this technology. Could you please help me on this?
I am integrating AdMob in my iOS application first time. During this process when add AdMob SDK into app , following errors appears.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString(inlove) 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)
Follow Google AdMob guide
You have to import following frameworks -
AdSupport,
AudioToolbox,
AVFoundation,
CoreGraphics,
CoreTelephony,
MessageUI,
StoreKit,
SystemConfiguration
you have to import all of these frameworks in your app for AdMob integration
1) AudioTollbox.framework,
2) MediaPlayer.framework
3) MessageUI.framework,
4) SystemConfiguration.framework,
5) StoreKit Framework
6) CoreTelephony Framework

Google Analytics doesn't work on new iOS project

I have created a new iOS project and added Google Analytics support following by official instructions.
I've added to Frameworks:
libGoogleAnalyticsServices.a
AdSupport.framework
CoreData.framework
SystemConfiguration.framework
libz.dylib
But it doesn't work with the errors:
ld: warning: directory not found for option '-L/Users/.../Sources/GoogleAnalytics'
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"_OBJC_CLASS_$_NSAttributeDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"_OBJC_CLASS_$_NSEntityDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_OBJC_CLASS_$_NSFetchRequest", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSSQLiteErrorDomain", referenced from:
-[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSSQLiteStoreType", referenced from:
-[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSOverwriteMergePolicy", referenced from:
-[GAIDataStore contextWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I fix it? And does it support arm64?
From Google Analytics developer page
The Google Analytics SDK uses the CoreData and SystemConfiguration frameworks, so you will need to add the following to your application target's linked libraries:
libGoogleAnalyticsServices.a
AdSupport.framework
CoreData.framework
SystemConfiguration.framework
libz.dylib
Looks like you are missing out CoreData.framework.
Running the lipo -info command on the GA library.
xcrun -sdk iphoneos lipo -info libGoogleAnalyticsServices.a
Gives result,
Architectures in the fat file: libGoogleAnalyticsServices.a are: armv7 armv7s i386 x86_64 arm64
So it does support arm64.
Hope that helps!
Thanks for all! The following steps helped me:
Remove CoreData.framework.
Add again CoreData.framework.
arm64 is now supported. Thanks to Amar.
Now I should fix the last warning:
ld: warning: directory not found for option '-L/Users/.../Sources/GoogleAnalytics'
It happens because I work with the project on different users.
You should add the libsqlite3.0.dylibfile to your frameworks.
To do this, under the projects target, on the general tab, you will find "Linked Frameworks and Libraries", just select the '+' button, and add the framework from there

Resources