Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

iOS: Fatal Exception: UIApplicationInvalidInterfaceOrientation

Discussion in 'iOS and tvOS' started by WolveX, Mar 5, 2018.

  1. WolveX

    WolveX

    Joined:
    May 31, 2016
    Posts:
    48
    We're getting this crash report on many devices mostly iPhone with iOS 11

    Fatal Exception: UIApplicationInvalidInterfaceOrientation
    Supported orientations has no common orientation with the application, and [UADSViewController shouldAutorotate] is returning YES

    I think it is mostly happening after the player watch an ad with different orientation (my game supports Landscape Left and Landscape Right only),
    in Xcode both "Hide status bar" and "Requires full screen" are selected.

    Fatal Exception: UIApplicationInvalidInterfaceOrientation
    0 CoreFoundation 0x183e9f164 __exceptionPreprocess
    1 libobjc.A.dylib 0x1830e8528 objc_exception_throw
    2 CoreFoundation 0x183e9f0ac -[NSException initWithCoder:]
    3 UIKit 0x18d4cb060 -[UIViewController __supportedInterfaceOrientations]
    4 UIKit 0x18d4d3c6c -[UIViewController __withSupportedInterfaceOrientation:apply:]
    5 UIKit 0x18e0023c0 -[_UIFullscreenPresentationController _adjustOrientationIfNecessaryInWindow:forViewController: preservingViewController:]
    6 UIKit 0x18d7a2da0 -[UIPresentationController _presentWithAnimationController:interactionController:target:didEndSelector:]
    7 UIKit 0x18d7d1508 -[UIViewController _presentViewController:modalSourceViewController: presentationController:animationController:interactionController:completion:]
    8 UIKit 0x18d7d2ec8 -[UIViewController _presentViewController:withAnimationController:completion:]
    9 UIKit 0x18d7d576c __63-[UIViewController _presentViewController:animated:completion:]_block_invoke
    10 UIKit 0x18d7d5ca0 -[UIViewController _performCoordinatedPresentOrDismiss:animated:]
    11 UIKit 0x18d7d56bc -[UIViewController _presentViewController:animated:completion:]
    12 UIKit 0x18d5372d0 -[UIViewController presentViewController:animated:completion:]
    13 mygame 0x1025196b4 __129+[UADSApiAdUnit WebViewExposed_open:supportedOrientations:statusBarHidden:shouldAutorotate:isTransparent:withAnimation:callback:]_block_invoke
    14 libdispatch.dylib 0x18381ea54 _dispatch_call_block_and_release
    15 libdispatch.dylib 0x18381ea14 _dispatch_client_callout
    16 libdispatch.dylib 0x18382b698 _dispatch_main_queue_callback_4CF$VARIANT$mp
    17 CoreFoundation 0x183e47344 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
    18 CoreFoundation 0x183e44f20 __CFRunLoopRun
    19 CoreFoundation 0x183d64c58 CFRunLoopRunSpecific
    20 GraphicsServices 0x185c10f84 GSEventRunModal
    21 UIKit 0x18d4bd5c4 UIApplicationMain
    22 mygame 0x1009870b0 main (main.mm:33)
    23 libdyld.dylib 0x18388456c start

    We are using Unity 2017.2.1p4 and Xcode 9.2
     
  2. WolveX

    WolveX

    Joined:
    May 31, 2016
    Posts:
    48
  3. leni8ec

    leni8ec

    Joined:
    May 23, 2013
    Posts:
    20
    same issue in Unity 2017.2.2f1
     
  4. ricardosanz97

    ricardosanz97

    Joined:
    Dec 14, 2017
    Posts:
    1
  5. BigRedGames

    BigRedGames

    Joined:
    Jun 25, 2016
    Posts:
    48
    I tried right now and this isn't working on the last version 2018.2.11f1
     
  6. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    115
    Same problem in 2019.2.12f.
    Sometimes crashes after rewarded / interstitial video (AppLovin Max: Vungle adapter).

    Code (csharp):
    1.  
    2.  May 28 13:25:54 iPhone-XR xxxxxxxx[500] <Notice>: Uncaught exception: UIApplicationInvalidInterfaceOrientation: Supported orientations has no common orientation with the application, and [SKStoreProductViewController shouldAutorotate] is returning YES
    3. (
    4.    0   CoreFoundation                      0x000000019555a3c0 <redacted> + 256
    5.    1   libobjc.A.dylib                     0x000000019475fd00 objc_exception_throw + 60
    6.    2   CoreFoundation                      0x000000019545fbe4 <redacted> + 0
    7.    3   UIKitCore                           0x00000001c22785b4 <redacted> + 924
    8.    4   UIKitCore                           0x00000001c226856c <redacted> + 100
    9.    5   UIKitCore                           0x00000001c2277f14 <redacted> + 492
    10.    6   UIKitCore                           0x00000001c218db24 <redacted> + 604
    11.    7   UIKitCore                           0x00000001c2183e00 <redacted> + 948
    12.    8   UIKitCore                           0x00000001c226bfc8 <redacted> + 1524
    13.    9   UIKitCore                           0x00000001c226dac4 <redacted> + 4320
    14.    10  UIKitCore
    15.  
    More info: https://github.com/AppLovin/AppLovin-MAX-Unity-Plugin/issues/28
     
  7. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,723
    Getting the same error with UnityAds
    - 2020.2.0a13,
    - ad package 3.4.7.
    - xCode 11.5

    Below the full log.

    Screen Shot 2020-06-11 at 22.44.30.png Screen Shot 2020-06-11 at 22.46.00.png
     
    Last edited: Jun 12, 2020
  8. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,723
    Made a project with a single scene & script to test this out.

    - 2020.2.0a13,
    - ad package 3.4.7.
    - xCode 11.5

    From the player settings :
    - default orientation is set to AutoRotation >>> it works.
    - default orientation is set to Landscape left >>> it crashes when showing it.

    Report bug : Case 1255423
     

    Attached Files:

  9. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,723
    Alright then just to confirm that if you use that same small project into 2020.1.0b12, the Video Ad works a charm then the mentioned error doesn't occur at all.
    Then switch back to 2020.2.0a13, the error crash the app straight again.
     
    Last edited: Jun 17, 2020
  10. RahulUnni

    RahulUnni

    Joined:
    Aug 12, 2020
    Posts:
    3
    I am too getting this same issue when an interstitial ad from IronSource mediation is being called. Rewarded video ads are working fine. Crash is happening in almost all iOS versions. Unity version is 2018.4.23f1. Xcode version 12.4. Any ideas on how to fix this?
     
  11. RahulUnni

    RahulUnni

    Joined:
    Aug 12, 2020
    Posts:
    3
    Solved : IS support sets portrait only ads for us as our game is in portrait mode. that solved our issue. It was giving landscape ads and as the game orientation is portrait, the game was crashing
     
    AdnanSiddique likes this.