Today I registered to adMob and I started working on adMob ads inside my apps.The first one is a game (with viewcontrollers) and i want to show an interstitial ad right after the game over screen, so i want to load the interstitial right after the view with game over loads (this view is accessible only after game over and a game lasts for one minute so it should not appear too often)
I have seen many tutorials, on youtube and on admob website, i had many problems like: admob framework not found even if I imported it, i disabled bitcode to avoid linker errors when i build, but i still can't see the test ad on my app, on the simulator and real devices.
I imported all the frameworks required by admob, and in xcode i have a question mark near GoogleMobileAds framework, what does it mean? First line about admob is:
import GoogleMobileAds
inside viewcontroller
var interstitial: GADInterstitial!
func createNloadAd () -> GADInterstitial
{
var ad = GADInterstitial(adUnitID: "XXX")
var request = GADRequest()
request.testDevices = [kGADSimulatorID]
ad!.loadRequest(request)
return ad
}
inside viewdidload
self.interstitial = self.createNloadAd()
if(self.interstitial!.isReady)
{
self.interstitial!.presentFromRootViewController(self)
self.interstitial! = self.createNloadAd()
}
in adUnitID I tried the ID of the interstitial i created in admob website, and other strings found inside tutorials, but none worked
in testdevices i added my iphone's UDID after i see the message in output, but i can't see any test ad and i have no error at all
And i didn't touch the storyboard,do I have to create something in the storyboard?
Before submitting the app to appstore i have to remove the testdevices line?And of course put my real AdUnitID
Maybe the code is right but if the app is not published admob won't load, or maybe I have to wait a day before my admob id starts working
Where I can find recent admob IDs for testing? So i test the app, and if works i change the id and submit
I am using Xcode 7.1, AdMob 7.5.2, and my app deployment target is iOS7 and i tested it on simulator with 9.1 and my old iPhone4 with iOS7, and this should not be a problem because admob supports even iOS6
Another question about admob guidelines, in other apps can i use iAd in a view and Admob in an other?May i be banned for this?only banner ads in lower part of the screen