I’m trying to set up the Admob plugin and am running into the following error when building my iOS project:
d: warning: Could not find or use auto-linked framework 'FBLPromises' Undefined symbols for architecture armv7: "_OBJC_CLASS_$_JSContext", referenced from: objc-class-ref in GoogleMobileAds(GADOMIDLightJSExecutor_f03a8796124708d9f242f19b30a2e142.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I originally followed the manual integration instructions here: http://docs.sdkbox.com/en/plugins/admob/v3-cpp/, adding all the required frameworks.
but they seem to be a little out of date and are missing some frameworks. I was able to build following those instructions, but I would then get runtime errors from Google.
Terminating app due to uncaught exception 'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK was initialized without an application ID. Google AdMob publishers, follow instructions here: https://googlemobileadssdk.page.link/admob-ios-update-plist to set GADApplicationIdentifier with a valid App ID. Google Ad Manager publishers, follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist'
I found https://github.com/sdkbox/sdkbox-sample-cpp317/tree/admob this example project. It has the missing libraries, so I’ve removed all the old ones and added in these ones.
I’ve also added the “-ObjC” linker flag to my Build Settings.
I’ve also added the required items to Info.plist but I don’t think that affects the build.
I’m not sure what else to try. I tried it with the latest frameworks from https://developers.google.com/admob/ios/download too but I get the same
Could not find or use auto-linked framework 'FBLPromises' error.
Can anyone help?
Edit: there’s a post a little further down with a similar issue, the suggestion there is that there are missing frameworks in the project, but I think I’ve got everything needed in mine, here’s a screenshot: