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