2
votes

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)

2

2 Answers

6
votes

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.

0
votes

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).