admob configuration suggests to add the following to our game.project file:
[admob]
app_id_ios = ca-app-pub-3940256099942544~1458002511
app_id_android = ca-app-pub-3940256099942544~3347511713
app_open_android = ca-app-pub-3940256099942544/9257395921
app_open_ios = ca-app-pub-3940256099942544/5575463023
ios_tracking_usage_description = Your data will be used to provide you a better and personalized ad experience.
But I do not want to use the app_open_ads. So I removed them from my game.project file. I only want to use interstitial and rewarded ads.
So my game.project section for admob looks like:
[admob]
app_id_ios = ca-app-pub-3940256099942544~1458002511
app_id_android = ca-app-pub-3940256099942544~3347511713
ios_tracking_usage_description = Your data will be used to provide you a better and personalized ad experience.
The android build works with the above. But for iOS the app crashes on startup with the following message in log:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString'
Fair enough, seeing the crash was just before the admob initialization callback, when I added the app_open_ios string back to game.project and rebuilt, the game launched and the test ad showed on app open.
I dont want to use app open ads.
Also, the ATT dialogue does not show before first initialization of admob on ios. Without that the app is not accepted for review
Yes, I can confirm that I am not using admob.show_appopen() anywhere in my code. Only admob.initialize() from the main menu when the game first starts up.
No line number was reported, but here is the full call stack:
Ok, so I went ahead and created all the identifier and provisioning profile for the admob example project.
And if I remove the lines completely like so:
[admob]
app_id_ios = ca-app-pub-3940256099942544~1458002511
app_id_android = ca-app-pub-3940256099942544~3347511713
ios_tracking_usage_description = Your data will be used to provide you a better and personalized ad experience.
then the admob build also crashes.
But if I leave them empty and not completely remove them, then the app does not crash:
[admob]
app_id_ios = ca-app-pub-3940256099942544~1458002511
app_id_android = ca-app-pub-3940256099942544~3347511713
app_open_android =
app_open_ios =
ios_tracking_usage_description = Your data will be used to provide you a better and personalized ad experience.