My Apps gets crash with following Crashlytics console description:

Fatal Exception: UIApplicationInvalidInterfaceOrientation

Supported orientations has no common orientation with the application, and [GADFullScreenAdViewController shouldAutorotate] is returning YES

App supports all orientations except when a user switches player in fullscreen mode. I use a method in AppDelegate to manage supported orientations:

var supportedOrientation = UIInterfaceOrientationMask.all func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {    return self.supportedOrientation } 

Tag:google-ads-api, ios, swift, crash, crashlytics

4 comments.

  1. Alexander Algashev

    I am using Google AdMob Interstitial Ads. When the app makes ads request device may be in portrait orientation. So it gets ads in portrait orientation. When a user switches full-screen mode and ads events occur ads need portrait orientation but the application does not support it in full-screen mode so a crash is happening. To resolve this problem I need to check ads orientation and current device orientation.

    1. user626776

      How did you check the orientation of the ads? I don't think there's such API by AdMob to access it.

    2. Alexander Algashev

      I store information about orientation when I make ads request.

    3. user626776

      The Api does not allow you to pass an orientation tho.

Add a new comment.