2

I am trying to submit an app to the appstore and they say I have to put an alert everytime the user taps on ads, I already put it but, when I click on the ad, it leads me to the browser anyway, how can I tell the app to wait til I click on continue or cancel?

Thanks for any help!

Edit

I'm using Admob for the ads, and here is the function where I suppose should be a condition to give the user a choice if he wants to be taken out of the app to see the ad or stay.

/// Tells the delegate that a user click will open another app (such as
/// the App Store), backgrounding the current app.

func adViewWillLeaveApplication(_ bannerView: GADBannerView) {
    print("Put a condition here where the user choose 
           between open the ad or stay in the app")

}
Community
  • 1
  • 1
Phantom_strike
  • 149
  • 2
  • 10
  • if the open browser action is coded by you, you can delay the action or delegate it to the popup's button click. If not, you can try if you can override the appdelegate's openURL method. If you can override it, you try to delay it for some time and then call super to open it. – Surely Oct 26 '18 at 16:04
  • @Surely That action is not coded by me, I'm using AdMob so I can't delay the transition between the app and the ad opening an URL or at least I don't know how to do it, since in the documentation there's not much information – Phantom_strike Oct 26 '18 at 16:13
  • 1
    Who says you _"have to put an alert everytime the user taps on ads"_? I've put plenty of ads in plenty of apps and never had to do that. What are you doing that means an alert is required? – Ashley Mills Oct 26 '18 at 16:15
  • 1
    @AshleyMills My app is for children so the appstore says that I have to put some kind of parental gate before opening an ad. – Phantom_strike Oct 26 '18 at 16:23
  • OK, that makes sense. Thanks for clarifying. – Ashley Mills Oct 26 '18 at 16:38
  • you can try this way to override the openurl method, which most likely used by the framework to open ad using browser. https://stackoverflow.com/a/10157646/4298881 – Surely Oct 26 '18 at 17:32

0 Answers0