Bug 15244 - Overriding GetSupportedInterfaceOrientations causes app unresponsiveness
Summary: Overriding GetSupportedInterfaceOrientations causes app unresponsiveness
Status: RESOLVED DUPLICATE of bug 13966
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.4.4
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-10-07 14:07 UTC by Jon Goldberger [MSFT]
Modified: 2013-10-11 06:40 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test project (1.29 MB, application/zip)
2013-10-07 14:07 UTC, Jon Goldberger [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 13966

Description Jon Goldberger [MSFT] 2013-10-07 14:07:23 UTC
Created attachment 5076 [details]
Test project

we have little trouble (description bellow) with some app feature using
Xamarin and we will appreciate your help.

There is attached demo application, in which you should reproduce mentioned
problem.

*What I want to achieve: *

- Movie player should rotate to landscape(left, right) mode(while in
fullscreen), while other views of app are restricted to different
orientations - I have view controller, where is inserted some view.
Into this view I inserted mpmovieplayercontroller. Whole application has
restricted view orientations to portrait, but when I enter fullscreen with
movieplayer I want to enable rotations also to landscape modes. When I
leave fullscreen mode, I want to have app restricted back to portrait mode.

*What I did to achieve this goal:*

- Because of targeting for iOS 6.0 and newer I am using "public
override UIInterfaceOrientationMask GetSupportedInterfaceOrientations
(UIApplication application, UIWindow forWindow)" in AppDelegate and
checking flag if movieplayer is in fullscreen mode or not set supported
orientations (see attached demo app)

What I expect: - MoviePlayer in fullscreen will have more supported
orientations

*
*

*What happens:*

- on iOS 6.x versions : After entering to fullscreen mode and after
tap to screen I expect that mpmovieplayercontrol style appears (but app
become unresponsive after 2 or 3 minutes)

- on iOS 7.0 after leaving fullscreen mode (tap on DONE button),
player minimize (but app become unresponsive for 2,3 minutes)


=========================================================================================
Problem occurs just on a device. 
Now I describe you what happens, and also on link bellow is zipped file which contains demo project where problem occurs and also two videos with workflow.
Device with iOS 6.1.3 is in video with name "iPad2_iOS6.1.3"
Device with iOS 7.0.2 is in video with name "iPadMini_iOS7.0.2"
Link for sample and videos: https://atlantis.vixperience.org:5001/fbsharing/kk6BpbsB

There are two videos (one is captured problem on iPad Mini with iOS 7.0.2 and second is captured on iPad2 with iOS 6.1.3 [see movies names])

How to reproduce problem:
- iOS 7 and newest -
- Run attached sample demo project on device with iOS 7 and newest. How you can see in video () app is responsive (clicking on switch, moving slider, start/pauze stream). After while () I entered fullscreen. There is also all working as we expected. On tap movie player control panel is showed, hidden. But after tap on DONE button to exit full screen app freeze. Now you can not interact with application (can not move slider, play/stop stream).

- iOS 6.1 and earlier -
- Run attached sample demo project on device with iOS 7 and newest. How you can see in video () app is responsive (clicking on switch, moving slider, start/pauze stream). After while () I entered fullscreen. At this point app become unresponsive. On tap no movie player control panel is showed.

After little research we found out, that this happens, when we override method public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations (UIApplication application, UIWindow forWindow) { } in AppDelegate class 
Does not matter which code is inside this method, problem occurs.

When we remove this method problem disappear. 
======================================================================================

*Info about Xamarin:*

_*Xamarin Studio Version 4.0.12 (build 3) Runtime: Mono 3.2.3 ((no/8d3b4b7)
GTK 2.24.20 GTK# (2.12.0.0) Package version: 302030000*

*Apple Developer Tools Xcode 5.0 (3332.25) Build 5A1413*

*Xamarin.iOS Version: 7.0.1.4 (Business Edition) Build date: 2013-20-09 23
:14:32-0400*

*Build Information Release ID: 400120003 Git revision:
593d7acb1cb78ceeeb482d5133cf1fe514467e39 Build date: 2013-08-07
20:30:53+0000 Xamarin addins: 25a0858b281923e666b09259ad4746b774e0a873*

*Operating System Mac OS X 10.8.5 Darwin iMac-MT003 12.5.0 Darwin Kernel
Version 12.5.0*
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-10-07 17:23:06 UTC
This looks like a dup of #13966.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-10-11 06:40:34 UTC
It is a dup of bug #13966.

That bug also contains a workaround (in comment 8).

*** This bug has been marked as a duplicate of bug 13966 ***