[TIMOB-10398] iOS: iAd orientation issues with NavGroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-10-01T20:21:44.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | 2013 Sprint 20, 2013 Sprint 20 API |
Components | iOS |
Labels | api, triage |
Reporter | Miles Lyon |
Assignee | Sabil Rahim |
Created | 2012-08-08T07:41:51.000+0000 |
Updated | 2017-03-21T21:29:06.000+0000 |
As an addendum it appears that number 4 does NOT actually address the issue. We put this on a device and we are still getting stuck with a black screen when we close ads. This was an attempted work around at best anyway. There seems to be an underlying bug with using iAd with navgroups.
this is probably an issue with the iphone as well as the ipad, if the orientation of the iphone is allowed to change from portrait. This case would likely be rarer however.
Hi, I'm having the same exact issue as well. This should be given a higher priority since it wasn't properly fixed in TIMOB-5006 and subsequent comments that the issue still existed were ignored. Not being able to have iAds in iPad apps is seriously costing us revenue, please fix ASAP, thanks.
This is due to the fact that NavGroup is not a proper window. This will require deep cuts and changes to NavGroup, including the fact that NavGroup would no longer be added as a view, but opened as a window.
Neeraj - Why did you just remove this item from the 2.2 release?
@Chris - The scope and nature of the changes required for this ticket are beyond the scope of next release.
That is unfortunate, is there a work around we could implement in the meantime?
The problem is that, underneath it all, iOS has this concept of a UIViewController, which serves as a steward to views and manages them. Logically, we map this to Titanium windows. UITabBarController is Ti.UI.TabGroup, for instance. Because of the nature of view controllers, there's a top-down flow of events. ViewDidAppear becomes focus, for instance. Keep in mind that viewControllers move views around, such as when you change tabs, the view of the 'focused' viewController/TiUIWindow is removed from the view hierarchy. NavGroup, for various reasons, was made as a view proxy containing a UINavigationController, added to the view hierarchy but not the viewController hierarchy. As such, it never gets focus/blur and orientation events from above. The iAd view does some strange mojo and looks at the orientation of the first controller it finds of a parent view. Since that is a UIViewController used by a window in the NavGroup's UINavigationController, it never gets the news... To fix NavGroup requires changing its parent class and the various changes and fixes for such, as well as making it no longer a view to be added, but a window to be opened or put into a tabGroup. In the meantime, there's two solutions, one predating navGroup. The first is a tabgroup with one tab and the tabbar hidden. The second is to put the ad outside of the navGroup, either below the navGroup or to place it atop the navGroup as a sibling, its parent being the window that the navGroup was added to.
So when is this going to be fixed? I saw that it wasn't fixed in 3.0 so when will it be?
Any update on this, been over 10 months now.
This issue could have been fixed as a side effect of the windows refactor + apple restricting the allowed orientations on iAd's . Tested on Xcode 5, with both iOS 6 and iOS 7 iPad retina simulators using 3.1.3.GA SDK. Marking ticket as cannot reproduce/fixed.
Closing ticket as the issue cannot be reproduced.