iOS Question How to update iAdMob?

jtare

Active Member
Licensed User
Longtime User
Hi everyone,

It's been a while since I've developed in B4i, and I could use some help to refresh my memory on how things work.

For context, I'm currently using B4i V8.10 with iAdMob V1.71. I recently opened an old app I hadn't worked on for some time, but it crashes on launch without showing any errors in the console. After some troubleshooting, I found that the issue seems to be related to the AdMob library, when I remove it, the app launches without any problems.

Now, here's where I need clarification: Can the iAdMob library be updated on its own, or do I need to update B4i to the latest version in order to get the updated AdMob library included? For reference, I’m using the hosted builder.

I came across this post: Firebase V3.00 + iAdMob V4.00 + Facebook 9.3, but I'm still unclear on the next steps.

If anyone could help refresh my memory or guide me on this, I’d really appreciate it!

Thanks in advance!
 

jtare

Active Member
Licensed User
Longtime User
Thank you Erel, I downloaded the file:
The new version requires Xcode 14+
Mac: https://www.b4x.com/b4i/files/Firebase301.zip
After downloading, I moved the iAdMob.h, libiAdMob.a, and the iAdMob.xml file (from this post) into the external libraries folder. I also removed the internal iAdMob V1.71 library by renaming it to iAdMob_old.

I had to add the following PlistExtra lines, which prevented the app from crashing on launch:
B4X:
'Main module
#PlistExtra:<key>GADApplicationIdentifier</key>
'this is a test app id.
#PlistExtra:<string>ca-app-pub-3940256099942544~1458002511</string>

Now, the app launches and displays ads as expected. No changes were needed in the code since the new iAdMob library retains the same objects and methods.

Note: I do not have the UMPConsentInformation library, I guess it is from a newer B4i version. I'm using the "old" way of asking for consent with App Tracking Transparency (this post).

If I'm not missing something, this should be it.
 
Last edited:
Upvote 0

jtare

Active Member
Licensed User
Longtime User
It seems that UMP (User Messaging Platform) is required, but not strictly enforced. However, not implementing it might result in a drop in ad revenue. On the other hand, ATT (App Tracking Transparency) is enforced by Apple during the app submission review if you're using AdMob.

So to be compliant with regulations and guidelines, both UMP and ATT is required. Or at least that is my understanding.
 
Upvote 0

Similar Threads

Top