Interstitial iAds on iPad in wrong orientation

147 views
Skip to first unread message

iap...@yahoo.com

unread,
May 12, 2014, 3:19:21 PM5/12/14
to google-adm...@googlegroups.com
I am using iOS 7, admob SDK 6.9.2

My app uses portrait orientation only.

I setup admob mediation of admob and iAds.

On the iPhone, all interstitial ads are shown in portrait orientation as they should.

On the iPad, admob ads show in portrait but iAds show in landscape orientation.

I have the following code:

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window

{

    return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;

}


When this code is called

            [interstitialAd presentFromRootViewController:viewController];

in the debugger I do see that application:supportedInterfaceOrientationsForWindow: is called before the interstitial ad is shown.

Any ideas why it's not working for iAds?

Makarenna Binimelis

unread,
Sep 15, 2014, 10:41:17 PM9/15/14
to google-adm...@googlegroups.com
try this in prepare segue 

UINavigationController *nav = [segue destinationViewController];

nav.interstitialPresentationPolicy = ADInterstitialPresentationPolicyAutomatic;


& this in the destination

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    [UIViewController prepareInterstitialAds];

    return YES;

}

Reply all
Reply to author
Forward
0 new messages