How to reproduce bug:
- Create a new XCode iOS project(project doesn’t contain LaunchScreen file)
- Add new file using the LaunchScreen template
- Open TARGETS, select YourAppName, go to General, scroll down to App Icons and Launch Screen
- Try to setup Launch Screen File by pressing blue drop down button, select your "LaunchScreen.storyboard"
- Switch from the General tab to another tab or file, then return to General
- Launch Screen file textfield is empty
2
Answers
Solution: Don't use blue dropdown button(autofill), manually type 'LaunchScreen.storyboard'
I created a new iOS project with the defaults (esp. "Storyboard"), and saved it.
The UI shows the value as blank, but what I noticed is missing (vs. my older projects):
Info.plist
lacksUILaunchStoryboardName
If you view as source, inside the main
<dict>
tag you should havebut it appears to be missing in my Xcode 16, so add it in by hand (via UI or editing file directly).
The UI’s property name is: "Launch screen interface file base name", and as it suggests, don’t use the full name with the file extension, use the filename as appears in your Project’s Navigation view"
This should connect everything. I added a label that said "foo" and also turned the View’s background green in the storyboard.
I did have to do a full quit of Xcode (cleaning build, deleting app in simulator did not work)… but after making the proper change and pounding the instance, I did get it to take effect.
NOTE: I have not tried setting the value I the UI, these steps will simply made a newly created project in Xcode work with the existing file in the project.