Ads for iOS

by Jon (Updated on 2015-10-21)


  • Introduction
  • Showing / Hiding Ads
  • Ad Events
  • Controlling the Position
  • Tips
  • Limitations
  • AdMob
  • Alternative Networks


Games on the App Store can make money by displaying ads. For the iOS platform, your best bet for making money is to display iAds, Appleā€™s own ad network. It may not pay the absolute most out of all networks, but it is easy to integrate and support.

Showing / Hiding Ads

To display an ad, you must tell the ad to show. We don't automatically show ads under any circumstance. This is done using the show/hide mobile ad block under Game > Mobile.


Note: An ad may not immediately show for a variety of reasons. See the Tips section below to learn why.

Ad Events

Sometimes, it's useful to know when an ad has been clicked on or dismissed, so that you can provide a smooth transition between viewing the ad and resuming the game. Stencyl provides the following events for ads.

Event Description
An ad is viewed User clicks on the banner ad
An ad is closed User closes the banner ad
The ad area loads Called each time a banner ad loads
The ad area fails to load Called when no banner ads can be loaded

These events can be found under the Mobile > Ads item under the Add Event dropdown.


Tip: We recommend pausing the game when an ad is clicked on and resuming it when the ad is dismissed. If you don't do this, the game will continue to run while the ad is overlayed over everything else.

Controlling Ad Position

Ad Position is set in Game Settings > Mobile > Monetization using the Ad Position dropdown. You can choose to place the ad at the Top or the Bottom of the screen.



Why doesn't the ad show?

During testing, ads can randomly fail to show. This is because Apple randomly causes them to fail, so that you can test how your app performs in these scenarios.

Even in cases where an ad displays in production, it may take 30 seconds, a minute or even longer for the ad to display if the ad inventory is empty at the time.

Avoid covering up the screen

When ads are displayed, they will cover up a small part of the screen. You should avoid displaying crucial game elements under an ad, such as HUD elements.

The height of mobile ad block (under Game > Mobile) provides the height, so you can lay your game out accordingly.



Stencyl does not support full-screen (interstitial) ads for the iAd network. If you need this functionality, consider using AdMob or an alternative network.


AdMob support for iOS is supported through a well-maintained 2nd party extension. Learn more.

Alternate Networks

Through free, user-created extensions, other ad networks besides AdMob are supported. These include...

Check out our Extensions Market and Extensions Forum for more details.

Print Article Edit Article How to Edit an Article
Disclaimer: Use comments to provide feedback and point out issues with the article (typo, wrong info, etc.). If you're seeking help for your game, please ask a question on the forums. Thanks!


Hi Jon

.. We will replace the built-in iAd functionality with AdMob by default ...

when is it going to happen ? can't wait :)

0 7 months, 3 weeks ago
iAds are in the process of being discontinued by Apple. We will replace the built-in iAd functionality with AdMob by default in the next major release of Stencyl.
1 8 months, 2 weeks ago
Updated once more for 3.0 to account for the recent changes and support for alternative networks.
0 2 years, 8 months ago
I've revised this article for Stencyl 3.0.
1 3 years, 5 months ago
And maybe support for full page interstitial ads between scenes?
It would be handy alternative for when you don't want to give up the real estate in landscape mode for a banner ad.

2 4 years, 5 months ago

Sign In to Comment