tuarua / AdMob-ANE

AdMob Adobe Air Native Extension for iOS 10.0+, Android 19+. Supports Banner, Interstitial and RewardVideo ads

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help question

RikAzerion opened this issue · comments

Hey folks,

I have a question regarding creating an ANE from the AdMob iOS SDK, since you appear to have succeeded at this I hope it's okay to ask here.

I've been working on a multi-platform SDK for Android, iOS and Unity with all kinds of 3rd party libraries. Most of the logic and all of the 3rd party libraries are in the Android/iOS layer, there is a bridge for Unity which simply passes the calls/data etc to and from the native layer. Just like I have a bridge for Unity, I've also created one for AIR (using the iOS/Android SDK's to do the heavy lifting and only exposing an API for AIR via an ANE), and that's gone well for a long time. Now I've got to implement the newest AdMob SDK though and am running into some problems that I can't find documentation/help for anywhere.

I can build the native iOS SDK (which contains the AdMob SDK) just fine, that also runs fine in a native iOS app, AdMob works fine. I then publish the iOS SDK as a .framework and add it as a dependency to the AIR iOS bridge project. I then publish the AIR iOS bridge and include it in the ANE project with all the necessary .frameworks (including those for AdMob), they're also listed in the platform.xml file.

This has worked fine so far for every 3rd party framework except AdMob, when I try to include the ANE in an app and build from Flash Builder I always get warnings about missing symbols, for instance:

Undefined symbols for architecture arm64:
"__MPLogWarn", referenced from:
-[MoPubAdapterMediatedNativeAd mediatedNativeAd:didRenderInView:viewController:] in MoPubAdapter(MoPubAdapterMediatedNativeAd.o)
"_MPResourcePathForResource", referenced from:
-[MoPubAdapterMediatedNativeAd mediatedNativeAd:didRenderInView:viewController:]

When I check the ANE I can see the required frameworks in there, and also the header file for the missing symbol (in this case MPLogging.h). So it looks like the symbols are in the ANE, but it's not seeing them for some reason. I have no idea how to package these frameworks and configure the ANE project so that it does find these symbols correctly. Do you have any idea what I might be doing wrong? Big thanks!