Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10398] iOS: iAd orientation issues with NavGroup

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-10-01T20:21:44.000+0000
Affected Version/sRelease 2.1.0
Fix Version/s2013 Sprint 20, 2013 Sprint 20 API
ComponentsiOS
Labelsapi, triage
ReporterMiles Lyon
AssigneeSabil Rahim
Created2012-08-08T07:41:51.000+0000
Updated2017-03-21T21:29:06.000+0000

Description

Comments

  1. Miles Lyon 2012-08-08

    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.
  2. Paul Hamilton 2012-08-10

    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.
  3. Chris Lopinto 2012-08-10

    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.
  4. Blain Hamon 2012-08-14

    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.
  5. Chris Lopinto 2012-08-14

    Neeraj - Why did you just remove this item from the 2.2 release?
  6. Neeraj Gupta 2012-08-14

    @Chris - The scope and nature of the changes required for this ticket are beyond the scope of next release.
  7. Chris Lopinto 2012-08-14

    That is unfortunate, is there a work around we could implement in the meantime?
  8. Blain Hamon 2012-08-15

    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.
  9. Chris Lopinto 2013-01-19

    So when is this going to be fixed? I saw that it wasn't fixed in 3.0 so when will it be?
  10. Chris Lopinto 2013-06-14

    Any update on this, been over 10 months now.
  11. Sabil Rahim 2013-10-01

    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.
  12. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced.

JSON Source