April 2021
Beginner to intermediate
506 pages
11h 57m
English
To use the AdMob helper file, you first need to set up a struct to hold some static properties.
In the AdMobHelper.swift file, and after the import statements, add the following struct:
| | struct AdMobHelper { |
| | static let bannerAdDisplayTime: TimeInterval = 30 |
| | static let bannerAdID = "ca-app-pub-3940256099942544/2934735716" // test id |
| | } |
The first property is the time, in seconds, each banner ad will remain visible on the screen. The second property holds the ad unit ID. Because you’re still testing and developing the game, it’s best to use the ID shown in the example. See Using Test Ad Units for more information about testing ads.
Ultimately, you need to extend the functionality of the ...
Read now
Unlock full access