W
wkaudio
Guest
I can not get banner ads to show up. My AdMob account is 100% set up and I created the Ad Unit about 2 days ago now. I don't have an android device myself to test on, but my artist (who tested the app on his phone) confirmed he gets no ads.
This is my current code:
In the creation code of rm_init, which starts the game:
And then on my title screen, in obj_title (which controls the whole room):
I get no errors in GMS2 from this, but xCode gives me this error when it runs the game:
I've done some searching around but haven't seemed to find the solution to my problem.
This is one of the last steps before my game is ready to release, so if anyone can offer help it would be greatly appreciated. Thank you!
This is my current code:
In the creation code of rm_init, which starts the game:
Code:
if os_type = os_ios {
global.app_id = [ios app id];
global.banner_id = [ios banner id];
} else {
global.app_id = [android app id];
global.banner_id = [android banner id];
}
GoogleMobileAds_UseTestAds(true,[test ad id]);
GoogleMobileAds_Init(global.banner_id, global.app_id);
//In this code I also initialize other variables for the game here, but they are irrelevant to the ads.
room_goto_next();
Code:
//Create Event:
//...After some other variables and things unrelated to ads
GoogleMobileAds_AddBanner(global.banner_id,GoogleMobileAds_Banner); //Interestingly, this line gives me a warning saying global.banner_id is only referenced once, is it a glitch or is it not being picked up from rm_init?
var bw = GoogleMobileAds_BannerGetWidth();
var bh = GoogleMobileAds_BannerGetHeight();
var dw = display_get_width();
var dh = display_get_height();
GoogleMobileAds_MoveBanner(bw / 2 - dw / 2, bh - dh)
GoogleMobileAds_ShowBanner();
Code:
2019-06-12 20:13:29.339148-0700 [project_name] banner ad failed to receive
This is one of the last steps before my game is ready to release, so if anyone can offer help it would be greatly appreciated. Thank you!