Since the switch to Unity 5.2 I get the following error on an iOS-Device when attempting to show an ad:
Attempt to present <UnityAdsMainViewController: 0x13d7e9520> on <UnityLandscapeLeftOnlyViewController: 0x13d56bbe0> whose view is not in the window hierarchy!
I read in an older thread that this issue was identified in March and resolved in the plugin version of Unity Ads back then:
“We have uploaded a new version 1.1.1 to Asset Store that fixes this issue.”
Could it be, that the problem has been reintroduced in the built-in Unity Ads-Service in 5.2?
We have (almost) latest version of Ads SDK included in Unity 5.2, so that shouldn’t be the problem, and I haven’t experienced this issue here on iOS 8.4/Xcode 6.4. Which version are you seeing this issue on, and do you have a simple repro project you can share?
Likewise I am on iOS 8.4 but I can now speculate about the source of the problem after some tests.
My app orientation-mode was set to LandscapeRight while the error message above is referring to a LandscapeLeftOnlyViewController.
When I changed my app orientation mode in Playersettings to “Autorotate” and checked both Landscape-Options in the process, the Unity Ads showed up fine on the iOS device. So I still think there is some bug somewhere left to be fixed but it works for me now.