Cordova/Phonegap iPhone splashscreen bug - iphone

I'm using cordova 2.6 to make an iPhone application in Landscape mode only.
I've a problem with my splashscreen, when I launch app I see the good one during view seconds, then it rotate automatically before loading index page.
All params in plist, xcode and xml are on landscape mode, splashscreen has good size and all works fine on iPad. I know there is no landscape splashscreen for iPhone, I just want it still in portrait, don't rotate after view seconds.
As I can see problem is due to the splashscreen plugin of Cordova who create a view in the bad orientation after display the good splashscreen.
Thanks for your help

There is a bug in CordovaLib\Classes\CDVSplashScreen.m where it only switches out the images on an iPad for Landscape vs Portrait.
if you remove the line
} else if (CDV_IsIPad()) {
and the corresponding } then landscape will work across devices. You will need to ensure that your Resources\splash folder has the following files in it:
iPad:
Default-Portrait~ipad.png (768x1004px)
Default-Landscape~ipad.png (1024x748px)
iPad #2x:
Default-Portrait#2x~ipad.png (1536x2008px)
Default-Landscape#2x~ipad.png (2048x1496px)
iPhone:
Default-Portrait~iphone.png (320x480px)
Default-Landscape~iphone.png (480x320px)
iPhone #2x:
Default-Portrait#2x~iphone.png (640x960px)
Default-Landscape#2x~iphone.png (960x640px)
iPhone 5 #2x:
Default-568h-Portrait#2x~iphone.png (640x1136px)
Default-568h-Landscape#2x~iphone.png (1136x640px)
Hope that helps

Related

iPhone app incorrect autoresizing on iPad

I have developed iPhone app. When i try to run this app in iPad simulator, it doesn't show me 1x/2x zoom button but application autoresize view in wrong way.
I don't want to make ipad native nibs/views so i need to disable autoresing the application.
Can somebody help?
EDIT: In 'Summary' tab, is 'iPhone' selected in the Devices drop-down menu.
EDIT2: When starting application, splash screen loads correnctly in small 1x window, than when firt view loads it switches to full screen.
Go to the Target's settings, 'Summary' tab, and choose 'iPhone' instead of 'Universal' in the Devices drop-down menu.
Go in your Application-Info.plist and check if there is something with iPad.
On a project, I started with doing an app Universal, only developped the iPhone theme. Then, to show to the client a pre-version, I tested on an iPad and the screen was quite reverse (iPhone : Portrait mode, iPad Landscape). I figured that in the Info.plis there was still the iPad : Landscape. Maybe something like that.

Xcode Launch images screens for landscape app

I'm developing universal app (game) which working only in landscape modes. Can I do not specify Launch images for portrait mode for saving size?
Yes, adding "Default-Landscape.png" will be enough, if you need so.
"Universal apps must provide launch images for both the iPhone and iPad idioms".. BUT.. launch images for the iPhone are only accepted in portrait mode (link).
so.. for Default.png or Default-iphone.png .. to provide a landscape launch image you must create the image and rotate it 90 degrees in an image editor

landscape splash screen for iphone apps?

i am developing an app which supports all orientations. i need to launch the splash screen (launching image) in all orientation types. but the project summary have only one field (portrait) to set the Default.png. how will i launch the landscape splash screen on my iphone app.
ipad have some features to setup both the orientations. is their anything like that in iphone,
thank you in advance
iPhone splash screen is only Portrait. iPad has landscape too because iPad home screen auto rotates unlike iPhone's.
In order to achieve such a behavior you can make your first screen identical to the splash screen ( add the same image on the background) . So it will look like a landscaped splash screen while you are loading the resources needed for your app but you can't start the app in landscape mode.
Hope this helps.
Cheers!
Nope, according to HIG, iPhone's default orientation is portrait and launch will do only portrait mode.
Let me quote a special behaviour
From Technical Note TN2244 Launching your iPhone Application in Landscape
Except for launch images used by the iPhone 6 Plus, asset catalogs assume that all iPhone launch images are for the portrait orientation.
Therefore
Launch images for iPhone apps are always sized to match the dimensions of the screen in portrait orientation. For applications that launch into landscape orientation, you should use your preferred graphics editing software to rotate the content of the launch image while keeping the image's size consistent with a portrait launch image (height > width).
if you don't do things correctly, you can end up with a blank/white screen
The result is a blank screen during launch as the system cannot find an appropriate launch image.
Unfortunately, the document was last updated 2 years ago.
2015-05-26 Updated for Xcode 6 and iOS 8.

Portrait vs Landscape Launch Images

An iPad app can support inclusion of launch images in both orientations; presumably, if your app supports auto-rotation, then this would suggest to me that if the user launches an app while the device is in Landscape mode, then the Landscape launch image is used.
But in all the apps I've built and released, this has never been the case. Never once has the Landscape launch image appeared, only the Portrait. After loading, the app will auto-rotate to whatever orientation the device is in, but at launch, it assumes you are in Portrait. Always.
Why?
I have seen many other apps in the store that behave this way, but then there are some seem to always automatically know immediately at first launch, from that first launch image, that you are in Landscape, if that's the case.
How is this done?
iPhone supports only portrait images (http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5)
Apps that don't support portrait orientations, provide the same portrait oriented image. For example, Angry birds on iPhone has the same portrait oriented image but the guys painted rotated graphics on it.
As it would turn out, the issue was due to leaving out the supported orientations in the plist file for the app. You can add these manually or just select them in the Target page. More details here:
How to get a landscape launch image to actually appear when launched?

How to change a launching image to landscape?

How to change a launching image to landscape?
I want to set different launching image when device was landscape mode.
so, I made a PNG file (file name : default-LandscapeLeft#2x~iphone.png)
and dragged it in supporting files folder.
and then building and running in device landscape mode.
but I have seen only black screen.
I can't know reason..
I doubt if .plist file was needed to modify..
Please help from advanced guy....
If you are on an iPhone or iPod, and if your app supports both portrait and landscape mode, then iOS always launches it in portrait mode. After it is launched, if the device is in landscape mode, then iOS tells your app to autorotate to landscape mode. This is explained in iOS App Programming Guide: Launching in Landscape Mode.