Auto-linked FBLPromises issue with Sdkbox and Admob

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: AdMob with C++ - SDKBOX, 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 GitHub - sdkbox/sdkbox-sample-cpp317 at 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 Google Mobile Ads SDK  |  iOS  |  Google Developers 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:

nedd add JavaScriptCore.framework

1 Like

I hate it when the answer’s so simple! Thank you, all works nicely now.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.