Search code examples
iosxcode6adsrevmob

Show ad after certain amount of interactions


I own a simple soundboard app, which basically plays a song when a button is pushed.

I wanted to know, if it was possible to show an ad after a certain amount of user interactions. e.g when 20 sounds have been played, a fullscreen ad would pop-up.

I've integrated RevMob in to my app, if that makes any differences :)

Thanks!


Solution

  • As far as I know, with any ad provider (including RevMob), you have pretty decent control on when an ad should appear.

    For RevMob, I see you can call "[[RevMobAds session] showFullscreen];" when you want to show a full screen ad (or RevMobAds.session().showFullscreen(); if you're using Swift -- you didn't specify).

    So just add a counter property in your view controller and increment the number of user interactions you want to keep track of and then show the full screen ad when you're ready.