Search code examples
iosswiftadcolony

ADColony video ad crashes the app due to orientation change


First time when I play ADColony ad it appears all fine but again second time when I play the ad it did not occupy the whole screen and after I closed the ad the app crashed with the log saying :

Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [ADCRotatingViewController shouldAutorotate] is returning YES'

My app is coded in swift and it returns shouldAutorotate() as false and the supported orientations are UIInterfaceOrientation.Portrait.rawValue | UIInterfaceOrientation.LandscapeLeft.rawValue

override func shouldAutorotate() -> Bool {
        return false
    }

override func supportedInterfaceOrientations() -> Int {
        return UIInterfaceOrientation.Portrait.rawValue | UIInterfaceOrientation.LandscapeLeft.rawValue
    }

Please help me regarding this isssue.


Solution

  • It sounds like you're integrating with an old version of our SDK. Please try updating with the latest available version at http://github.com/adcolony. If that doesn't solve your issue, please submit a support ticket to [email protected].