Question

I'm trying to get an external screen for an iOS iPad app up and running. Currently I just could test this with the iOS simulator (VGA connection kit is on it's way).

My problem is that when starting the app in landscape (left or right) or portrait upside down the external display remains black. If started in normal portrait mode then everything is fine.

You can test the whole thing with the sample project provided by Apple. It works in 1 of 4 cases (see below) and behaves exactly like my project:
https://developer.apple.com/library/ios/#samplecode/ExternalDisplay/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010724

Steps to reproduce the problem:

  1. Start your iPad 6.0 simulator by hand (not via Xcode, run project).
  2. In the menu bar: Hardware > TV-Out - pick a screen resolution. A second window will appear and act as a second screen.
  3. Turn it via CMD+ArrowLeft/Right to landscape-left/right or portrait upside down.
  4. Now run the project in your iPad 6.0 simulator.
  5. If the application has started (don't worry, this app just was not designed by Apple to rotate its interface correctly) press the button in the navbar.
    -> The second screen will remain black.

Same test in protrait mode (will work correctly):
Quit the simulator, repeat steps 1,2,4,5, don't turn the simulator, leave it in normal portrait mode.
-> The second screen will be filled.

Now I wonder why that is. It's not very nice to only have the second screen at hand if the app was started in portrait mode. And it's not very pleasant to develop and test with this problem. Funny thing is that whenever you start the app in portrait mode it works, but if you start it once in an other orientation it won't work anymore till you restart the simulator. Maybe you can also tell me if this is also a problem with the real device and a connection kit / airplay.

Concrete questions:
- Is this bahaviour of the simulator normal?
- Did I just forgot something?
- Is this problem just occuring in the simulator and not with running apps on devices connected to a seconds screen?

Thankful for any hint or advice!

Was it helpful?

Solution

Problem has solved itself. With the newest versions of Xcode/iOS Simulator it works as expected now. The code iteself was ok, just the Simulator did not handle everything like it would happen with a real device.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top