Adding an AdMob Ad in the App

Let's see how to implement ads in the game. We will be using AdMob to integrate an ad into the game.

You have to sign up for AdMob. If you don't already have an account, you can sign up at www.google.com/admob. Signing up is easy and it's free. If you have a Gmail account, you can use it to sign in as well.

www.google.com/admob

Adding an AdMob Ad in the App

To implement the ad, we have to first create an app on the AdMob site and then download the AdMob framework to implement the ad in the game. Click on the Apps button on the sidebar of the site and click Add App:

Next, you will be asked if the app is already published. Click NO as we have not yet ...

Get Swift Game Development - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.