tags:

views:

885

answers:

2
+1  Q: 

iPhone AdMob ad

Hi,

I have the following two questions, I tried googling these, but didn't find any luck. Please help me.

  1. I have integrated AdMob ad to my iphone application. when the admob view is clicked, safari gets opened, and if there is any error in loading the ad, it displays an error message saying "safari cannot open the page because too many redirects occurred" there is a ok button in the error pop up, when ok button is clicked only the error popup is closed and control is not coming back to the application. How do we make it come back to the application?

  2. How to add auto-close functionality to the adMob ad?

+1  A: 

(1) Once control is transfered to safari, iPhone OS starts shutting your app down. Control will not transfer back to your app - the user will need to close safari and restart your application.

The only way to display web content in an iPhone app without your app closing is by embedding the web browser inside your application. However, I expect your ad network insist that their adverts open in safari to ensure that the content isn't tampered with.

(2) Likewise, there's no way to get back to your app once safari started loading. I suggest you focus on fixing whatever is wrong with the implementation of the ad code.

U62
oh. OK. thank you so much
saikamesh
hi, is there any specific sdk call for displaying video ads? and is there anything we can do with our code to close the ad after some period of time?
saikamesh
As Pablo Santa Cruz notes, you can use an embedded web browser to display ads.
Stephen Darlington
+1  A: 

I think this will answer both questions:

With AdMob, you can control the way your ADS are being transferred to Safari. So, if you NO NOT want that to happen, you can add the following method to your class implementing AdMobDelegate protocol:

- (BOOL)useEmbeddedWebView
{
    return YES;
}

That way, the AD will be displayed on an internal browser instead of launching Safari to do so.

Pablo Santa Cruz