Launch screen is not being presented for iOS 9 - ios

I am having issues displaying an image as a launch screen. I have added some images that will walk you through what I have done.

My recommendation is to not use Launch Image and use the Launch Screen instead, since you can use auto layout and support any screen size, including iPad multitasking, or new devices released in the future.
However, if you really want to use the Launch Image, seems like iOS9 requires different launch images for each device orientation. That might be your issue.
iOS 9 enforces the UILaunchImages requirement; apps can no longer
declare the same launch image to support different interface
orientations.
https://developer.apple.com/library/prerelease/ios/releasenotes/General/RN-iOSSDK-9.0

Related

Non-Retina resolution on newly created iOS App (Xamarin.Forms)?

I just created a new app with a MvvmCross template. But the iOS resolution looks like non-retina. Also, I only have i386 and x86_x64 as supported architectures and not ARM like all my other projects have. So what do I need to change that the app runs on the native resolution?
Has some one an idea what I need to change that the app stops looking like it was made for a 4" iPhone instead of a new app? Here are a few screenshots that may help to make clear what I mean (the App "PLZ Suche" is the one with the 'old' looking resolution, compared in the App Switcher it is clearly visible - all screenshots are taken on a iPhone 6S).
Problem solved -
This 'compatibility-mode' is triggered when you do not include a retina resolution splash screen (or launch screen as it is called in the Apple ecosystem) in your app.
Make sure that you have all the right types of splashscreens included in your app.
You can either:
use a Storyboard (or XIB) that adapts to different screen resolutions automatically
use XCode Asset catalog 'LaunchImage' image set, and fill all the correct sizes
You can read more about all the sizes and the launch screen on the Apple documentation page.

Removing launch screen file from Info.plist scales the views

I noticed something that when you remove the launch screen file entry from the XCode Info.plist file, any view of any view controller becomes scaled according to the screen size, so the views appear zoomed in on large screen sizes such as the iPad Pro (12.9 inches) and appear somehow zoomed out on smaller devices (iPad Pro 9.7 inches).
In that case it seems that the Auto Layout constraints have no effect as the scaling is done automatically.
I really can't understand what does this has to do with the layout constraints, so I appreciate if any one can explain what's the reason for that.
Without being able to provide deep details, iOS uses the launch screen definition (view or static images) to determine which size classes the app should use. If you have not supplied those, it seems you get scaling that you generally do not want.
That doesn't mean auto-layout no longer has any affect... it just means that the auto-layout engine is not using the current screen size for its size/positioning calculations.
You'll see very similar results if you explicitly set your project for iPhone only.
Simple, obvious solution: Don't remove the launch screen.
Yes this is expected behaviour... Same is for iPhone 6 Plus. If you remove the iPhone 6 Plus launch screen, it will display the iPhone 6 scaled version.
This is just for backward compatibility. If your app is not ready for iPad Pro or iPhone 6+, scaled version can be used by removing the respective splashing screens.
All current iPhone apps or iPad apps in AppStore those are not optimised runs as a scaled version.

Adding a Launch Screen changes the display of my whole app

I tried adding a launch screen to my app. I tried the simplest : just add a new file of type Launch screen to my project (and do nothing more). But this seems to change the resolution of my whole application. Here are sample screens of the same controller of my application with and without the Launch Screen :
without the launch screen :
with the launch screen :
Strangely, once I have used the Launch Screen once, I need to quit and re-launch the simulator to re-obtain the original resolution.
What should I do and which resolution is the correct one to work with ? Does it have something to do with retina ?
I can copy-paste the code generated in the LaunchScreen.xib if needed.
From Apple's documentation:
You use a launch XIB or storyboard file to indicate that your app runs
on iPhone 6 Plus or iPhone 6.
By adding a launch screen you activated native support for iPhone 6 and iPhone 6 Plus. That means that your app is no longer scaled up to adapt the larger screens of the iPhone 6 and 6 Plus, but uses the full resolution of those larger screens (which IMHO is a good thing that you should do).

How to force universal app on iPad into scale mode?

I created an universal iOS app. On all iPhone variants I want native resolution without scaling, so I created splash screen images for all available sizes in images.xcassets/LaunchImage.launchimage and set them all in Xcode:
Now, this works very well for all iPhone versions up to the biggest iPhone 6 Plus.
On iPad (with high pixel density) though I don't want native resolution. Instead I want it to scale the app (even if it looks a bit blurry then, but that's ok).
How would I do that?
In image assets you have to provide proper size for each launch screen, You can not use the same image for two devices in launch-images ( unless you have two copies of the same image ).
If you want to make app-size smaller, implement launch screen, set its background color to your desired background color and put your logo in the center of it. You can now remove iPhone 6,6Plus images from image assets, but you still have to provide launch images for iOS 7 devices (old iPhones / iPad ).
Don't use the Asset Catalogue. Create a LaunchScreen.xib , add a UIImage inside the view. Open the attribute inspector in the right hand panel and set the view mode to Aspect Fill.
The solution was quite easy, I simply changed project type from "universal" to "iphone" and that did the trick!

Remove launch screen if device version in iOS 8

I have an application which works for iOS 7 and 8 and I'm using auto layout so it will be ok on all iPhones. For iOS 7 I need the launch screen file but for iOS 8 I want to hide it.
How can I remove it specifically for iOS 8?
Thanks in advance :)
The launch screen is processed and displayed by iOS before anything else happens. You can't do anything programmatically to affect the launch screen as your code won't run until after the launch screen has been displayed.
So the only thing you can do is take advantage of the xib launch screen support introduced with iOS8, to provide two different launch screens: one for iOS8+ (the xib) and one for iOS7 and lower (the png).
In the HIG it says the following...
In iOS 8 and later, you can create a XIB or storyboard file instead of
a static launch image...
..
If you also need to support earlier versions of iOS, you can continue to supply static launch images in addition to a launch file.

Resources