Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate splash screen for all types of iPhones in Xcode 6.1?

I need to create and app which will run on iPhone 4S, 5,5S, 6, 6+ and the deployment target will be iOS 7.1. I saw Apple introduced LauchScreens.xib for creating the launch screen (Splash Screen) and also there is an Image Assets in which I can provide the Launch Images screens. See image below:

enter image description here

So my questions is how can I use the splash screen for all the iPhones? Or I should say, what is the standard way to to do that when I am using Xcode 6?

I have been looking for the answers and reading blogs and Apple's Documents as well but I didn't find anything. Everything was singing its own song but not the answer.

like image 421
Developer Avatar asked Sep 22 '14 06:09

Developer


People also ask

How do I add a splash image in Xcode?

Adding splash screen on iOSStart by opening the file ios/app-name. xcodeproj in Xcode. Then, drag the file BootSplash. storyboard under the Project directory in the Xcode file manager on the left side of the Xcode from the path ios/app-name/ directory.

Does iOS have splash screen?

Forget about adding images for splash screen (launch screen) with different sizes. Your app will be much bigger for no reason. You can use smarter way how to achieve awesome splash screen just with one size of the image.

How do I change launch screen in Xcode?

Choose File > New > File. Under User Interface, select Launch Screen, and click Next. Give the launch screen file a name, choose a location, select the target that you want to add the file to, and click Create.


2 Answers

In Xcode 6.4, as of 2015-07-06 (yyyy-mm-dd), I used launch images rather than a launch screen file (.xib). This is targeting iOS 7.1+.

First, delete the entry from the Launch Screen File drop down. Leave this blank, if this points to a .xib the .xib will override the launch images source. Here is the setup in Target / General / App Icons and Launch Images. /Users/patrickweigel/Desktop/Screen Shot 2015-07-06 at 10.20.36 AM.png

Second, create a new Launch Image (NOT a new Image Set) after selecting the “+” at the bottom of the middle pane in Images.xcassets. Here is the pop-up after you select the “+”. enter image description here

Third, in the new Launch Image, there will be 20 squares, each asking for .png file. Now you need to create 20 .png files of the correct size. I used Pixelmator and exported each file as a .png. But what is the “correct size”? See below. enter image description here

Launch Images Correct Size Chart enter image description here '*No Status Bar

like image 41
Patrick Weigel Avatar answered Oct 19 '22 09:10

Patrick Weigel


In Xcode6 for all devices splash screen you need to make splash image for each device size retina and non retina.

Best way of done this thng use asset Catalog from target-->general like following screenshot:

enter image description here

when you tap the right small arrow near of launchImage (->) you can see the following window:

enter image description here

Currently there is empty because from right side there is no any target selected so if your deployment target is 6.0 you need to set check mark like following screenshot so you can see the all image need box :

enter image description here

See when you add wrong dimension image in catalog you can get warning at top right corner and when you tap on this warning you can get actually dimension. see the following screenshot for:

enter image description here

So from the warning log you can know which dimension image need for which splash screen.

Other way

No need to use Asses Catalog and no need to use LaunchScreen.xib you can still use old way:

create splash screen image with following size:

Default-568h.png                   320 x 568       [email protected]                640 x 1136 [email protected]                750 x 1334 [email protected]                1242 x 2208 Default.png                        320 x 480 [email protected]                     640 x 960 

Now in plist you need to add following data:

  • Add one row by tap (+) its called UILaunchImages

enter image description here

  • and you need to fill this row like following

enter image description here

that's it no need to do any thing hope that answer helps to other as well.

like image 186
Nitin Gohel Avatar answered Oct 19 '22 11:10

Nitin Gohel