10

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?

sdabet
  • 18,360
  • 11
  • 89
  • 158

1 Answers1

9

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.

Danny Bravo
  • 4,534
  • 1
  • 25
  • 43
  • I have re-created the target from scratch and now it works, so I suspect that XCode was in some inconsistent state. I'll accept the answer. – sdabet Jun 22 '16 at 09:14
  • Thank you. I was about to pull out my hair when you reminded me that I did not add this screen to my new target under build settings. +1 – Christopher Smit Jul 12 '18 at 07:14
  • is it possible to have scheme-specific launch screen? my schemes have same plist – ramzesenok Aug 19 '20 at 10:40