Admob mediation on iOS (Facebook, InMobi) - error "Undefined symbols for architecture ..."

533 views
Skip to first unread message

Felix Wielander

unread,
Apr 29, 2020, 12:55:56 PM4/29/20
to Google Mobile Ads SDK Developers
I have been trying to integrate Facebook ads for mediation with Admob into my flutter app.
Previously I have been using the flutter library firebase_admob to serve plain Admob banners, which worked fine on Android and iOS.

Now I am trying to integrate Facebook mediation with Admob and therefore followed the steps under point 3 here: https://developers.google.com/admob/ios/mediation/facebook#step_3_import_the_facebook_audience_network_sdk_and_adapter

However, when trying to run my iOS application on the simulator I get the following errors for Facebook mediation:
...
14 warnings generated.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GADMediatedNativeAdNotificationSource", referenced from:
objc-class-ref in FacebookAdapter(GADFBNativeAd.o)
"_OBJC_CLASS_$_GADNativeAppInstallAdView", referenced from:
objc-class-ref in FacebookAdapter(GADFBNativeAd.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'nanopb' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.

When I try the same for InMobi, I get the following errors:
...
14 warnings generated.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GADMediatedNativeAdNotificationSource", referenced from:
objc-class-ref in InMobiAdapter(GADMAdapterInMobi.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'nanopb' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.

I already tried several things like including
pod 'FacebookSDK'
or
pod 'Google-Mobile-Ads-SDK'
to my Podfile, but the error persists.
I also tried to several times clean the project and various variations of installing the pods for GoogleMobileAdsMediationFacebook or GoogleMobileAdsMediationInMobi respectively +  the just mentioned Facebook or Google-Mobile-Ads SDK pods. Still the same error.

Am I missing some basic step here?
Any hint is welcome.

Best,
Felix

Mobile Ads SDK Forum Advisor Prod

unread,
Apr 29, 2020, 2:30:35 PM4/29/20
to felix.w...@gmail.com, google-adm...@googlegroups.com
Hi Felix,

Thank you for bringing this issue to our attention.

I was wondering what podspec versions are you using? If 5.8.0 or lower. I would ask that you uopgarde your podspecs to 5.8.0.1 as stated in this previous post.

If the issue should still continue or you are using the updated podspec. Please then share with use via "Reply privately to author" button with the following information.
  • Pub Id and Ad Unit Ids in question
  • Any error logs or stack trace
  • Sample app with implementation or code snippet.
And always make sure when sharing any private information make sure it is not posted on the forum and only sent to us.

Regards,
William Pescherine
Mobile Ads SDK Team

ref:_00D1U1174p._5001UaSrNr:ref

Felix Wielander

unread,
Apr 29, 2020, 3:04:47 PM4/29/20
to google-adm...@googlegroups.com
Thanks for your answer William.

There's already the thing: When adding pod 'GoogleMobileAdsMediationFacebook' to my Podfile and running "pod install", it strangely installs GoogleMobileAdsMediationFacebook version 4.99.3.0 and FBAudienceNetwork version 4.99.3. However, the current version would be 5.8.0.1 for the first and 5.8.0 for the latter.

I just tried to reproduce the issue with a freshly set up flutter project (standard empty flutter app) and added the GoogleMobileAdsMediationFacebook pod. Without doing anything else than adding this dependency I can reproduce the same error shown in my previous post. I don't know if I am making any dumb mistake, as I am no experienced iOS developer...

Do I have any influence in the versions of pods that are installed as dependants of GoogleMobileAdsMediationFacebook?

Best,
Felix

Mobile Ads SDK Forum Advisor Prod

unread,
Apr 29, 2020, 5:15:54 PM4/29/20
to felix.w...@gmail.com, google-adm...@googlegroups.com
Hi Felix,

Thank you for adding this additional information.

First off to let you know, we normally do not offer technical support to Flutter. But having read over your information and what you have said I would suggest a few things.
  • First here is the normal steps to implement cocoapods and getting start with iOS using cocoapods, as a reference. And the dependency should be changeable.
  • Also here is a link to our Github that shows a mediation sample that again you can look at and shows how we implement this.
  • Also here are some code snippets from Cocoapods themselves. And As you can see you should be able to change the dependency with the podfile itself.
  • Also here are the documents and walk thrus that we have for Flutter. These should also help you with some of what you are looking at.

Felix Wielander

unread,
May 1, 2020, 2:49:07 PM5/1/20
to Google Mobile Ads SDK Developers
Thanks for the help. Finally I got it to work!

The problem was that flutter by default sets the iOS project's deployment target version to 8.0. As I didn't state an exact version of 'GoogleMobileAdsMediationFacebook' in my Podfile, version 4.99.3.0 was installed to comply with iOS version 8.0.
After adding the concrete version '~> 5.8.0.1' to the pod and setting my project's deployment target version to iOS 9.0 the problem was solved.

Best,
Felix
Reply all
Reply to author
Forward
0 new messages