Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target-specific launch screen

I have an existing iOS app with a single target and a corresponding LaunchScreen.storyboard.

In the same Xcode project I have created a new target (e.g newtarget) by duplicating the initial one. I also have created a new launch screen LaunchScreen-newtarget.storyboard (added as a resource of this target) which is referenced in the new target's plist file (in Launch screen interface file base name).

But I only see a black screen instead of the launch screen when running this target.

How can I use a separate launch screen for my new target?

like image 514
sdabet Avatar asked Mar 08 '16 14:03

sdabet


People also ask

What is the difference between launch screen and splash screen?

A splash screen, also known as a launch screen, is the first screen that a user sees when opening your app, and it stays visible while the app is loading. You can control when the splash screen disappears by using the native SplashScreen API.

What is an app launch screen?

Every iOS app must provide a launch screen, a screen that displays while your app launches. The launch screen appears instantly when your app starts up and is quickly replaced with the app's first screen.


1 Answers

You need to make sure the launch screen is added as a resource for the new target and then update the UILaunchStoryboardName key (also known as Launch screen interface file base name) in the new target's plist file to say LaunchScreen-newtarget.

like image 196
Danny Bravo Avatar answered Oct 18 '22 05:10

Danny Bravo