How to detect orientation of ios simulator at launch app? - ios

I saw that too many answers for this question but they almost about ios device, not about ios simulator. I want to detect orientation of iphone simulator. I rotate iphone simulator to landscape but so far all solutions return portrait orientation at launch app. Is this ios simulator's bug? I have no device to test, so i need to test on simulator first but it seems to be not work correct on simulator. Thanks for any explanation.

Try to delete portrait modes from the 'Supported interface orientations' array in the Info.plist file of your application. I was able to force landscape startup with this.

Related

iOS 9 Multitasking feature enable but restrict iPhone app to support only Portrait mode

I have added support for multitasking feature in iOS 9. For that I have checked all orientations support in info.plist. My App is universal. For iPhone it only gives portrait mode support, but in that i have given all orientation support to one screen.
Now I always want to launch app in Portrait mode on iPhone. Its working in all iPhone models except iPhone 6+ , who is giving orientation support to springboard. Please help, I have tried all possible combination without any success.
In supported orientations in your info.plist make sure Potrait (bottom home button) is at item0. This will always launch application in Potrait.

Running iPhone application on iPad shows a black bar on top of the app

I have see a black bar on top of the iPad app , actually app is designed for iPhone and running in iPad, Not able to reproduce in iPhone and this happens very rare.
Please Help on how to fix this issue
did you create the .xib file for ipad or storyboard? if so the also change your device in the deployment info section from iphone to universal.
You need to create universal application for both iPhone or iPad, currently your application target only iPhone Device.

Can't get AIR app to display in landscape mode in iOS (AS3)

This issue is happening in iOS ONLY, all android and pc versions of the app display in landscape mode fine with no issues
I am trying to get the app to display in landscape mode in iOS OR at the very least be able to orient to landscape mode when the iphone/ipad is tilted to landscape position
However no matter what I try the app will always open in portrait mode
The dimensions are 480x320 and I have tried setting the aspectratio in publish options to landscape, I have even tried
stage.setAspectRatio(StageAspectRatio.LANDSCAPE);
I have also tried adding "aspectRatio> landscape /aspectRatio>" to the XML file
I have been looking for DAYS for a fix on this issue and nothing works
Please some one help!
How are you publishing your app (i.e. FlashCC, FlashBuilder etc) and are you using the latest AIR SDK?
Publishing landscape only iOS apps is definitely possible with AIR so I suspect it's going to be an issue with how your settings currently are.
If you're targeting iPads perhaps try including a landscape default image.
Default-Landscape.png, Default-LandscapeRight.png etc.

How can I simulate an iPhone app running on an iPad?

My app keeps getting rejected from the app store based on this rule:
2.10 iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution
I'm trying to figure out how I can test whether my fix is working. How can I simulate "running on an iPad at iPhone resolution" and how can I confirm that it work correctly at both resolutions?
What you can do is to choose an iPad Simulator from the schemes-dropdown menu and run it on there even though it is an iPhone-only application. If it runs fine on there, you should be good to go.
Hope that helps :)
In info.plist, for the key "Supported interface orientations (iPad)" removing any landscape orientations and
leaving only Portrait (bottom home button) fixed my problem.

iOS Simulator not rotating for iPhone (working for iPad)

When I rotate a virtual iPad device to landscape in the iOS simulator, the device rotates and the iOS UI (the home screen) rotates to match the physical orientation, as expected.
If I rotate a virtual iPhone, the device rotates but the UI doesn't rotate, which seems wrong. It's as if I have the orientation locked in the settings, but this isn't set.
iOS Simulator 7.0 (463.9.4.2)
iOS version on simulator is 7.0.3 (11B508)
OS X version 10.9.1
I have tried deleting the application support folder, with no effect.
Does anyone know what else I can try to fix this, please?
Thanks
This seems wrong? This is standard behavior of real iPhones. The home screen has never supported any orientation other than portrait, at least not without the aide of jailbreak tweaks.

Resources