iOS: storyboard for the launch screen

So the “Launch Screen File” setting in Xcode is displaying the custom storyboard that you specified in the Projucer and the .storyboard file shows up in the “Resources” folder, but it’s not displaying when you start the app? Can you try completely removing the Builds folder of your project and re-saving?

Yes. Every time before making and running a build I cleared the Builds folder to make sure my change was applied.

Ah, I see what’s happening now. The folders specified in “Custom Xcode Resource Folders” are added to the project as folder references so the target membership is set for the whole folder and not the individual files within the folder, which is why the file isn’t being picked up by Xcode.

Unfortunately I can’t see a simple way to work around this so for the time being it looks like you’ll need to add the .storyboard file as an “Xcode Resource” in the Projucer and then delete the file from macOS builds as you were doing before. I’ll try to come up with a nicer solution…

That makes sense. Cause I used to add my storyboard in “Custom Xcode Resource Folders” and applied a patch I created which changes the storyboard’s fileRef number in /project.pbxproj to make launch screen display correctly, until @matkatmusic gave his solution.

Thank you very much for your help! Hope there will be a nicer solution.

In a similar vein/to support this thread, I have the LaunchScreen.storyboard added as an Xcode resource in ProJucer. The same name applied in the iOS exporter for Custom Launch Storyboard.

This works fine for iOS work. When I want to switch over to MacOS testing I get the understandable error iOS storyboards do not support target device type “Mac”. Which makes sense. What I then do is go to the Inspector for the LaunchScreen.storyboard and uncheck Target Membership for the App that I’m building. This works fine but seems like a silly step.

So I wonder if it’s possible to define resources in the exporter sections (perhaps as a list of names per Custom Launch Storyboard) that you now want excluded from target membership, or just excluded from the Xcode project altogether. Either works for me.

Does this seem like a fair ask? Is it already being worked on?

This experience was had on ProJucer 5.4.3 and the Dev branch.

Cheers, Jeff

I think it would probably be easier/faster to just have separate jucer files for desktop and ios, assuming the project wasn’t too complex.

Doesn’t that somewhat defeat the purpose of the switchable Selected Exporter from the Projucer UI? I quite like that feature - seems like it should work, no?

1 Like

Well, when Apple switched from xcassets to storyboards, the iOS side of the ProJucer didn’t really keep up… They’re busy with SOUL, anyway…

Just separate out your iOS specific files from your OS X/Windows specific files from your common files, and make separate Jucer projects for the time being. it’s the simplest thing to do for the time being.

Just looked up SOUL… LOL Yeah focus on that. I can live with this iOS/Mac switching issue :wink:

I’ve just pushed commit 2fd7c58 so if you rebuild the Projucer from the develop branch you can now specify a path to your .storyboard file relative to the project folder and it’ll be added as an Xcode resource. This means that you no longer need to add the file to the project source and it can be added only for the iOS build.

So for a folder structure like this:

Your .jucer project should look like this:


@ed95 I use the “Custom Xcassets Folder” Setting in Projucer and would like to use a “Custom Launch Storyboard”, too. Why does the first setting block the second? In my project, I used both beforehand and now wanted to make it easier with the Projucer.
Wouldn’t it be possible to allow both? I know, that I “override” the Images.xcassets/LaunchImage settings with a storyboard. That’s fine - but I need the other assets defined there, too.

The idea was that for projects which specify a custom xcassets folder we didn’t want to add a default blank launch storyboard as this would overwrite the custom launch images. I suppose if you’ve specified both, then we should add both though. I’ll make that change.

@ed95 That would be great! Thank you.
Another question: Is it possible to fill the XCode project setting “General/App Icons and Launch Images/Launch Screen File” with my storyboard automatically by Projucer? If not, I have to add it there by hand every time I save the Projucer file.

The “Launch Screen File” plist setting will be set by the Projucer, is this what you mean?

Yes, that’s what I mean. I tested it by commenting out Line 1915 in jucer_ProjectExport_Xcode.h and my custom storyboard was copied to the Resources Folder in XCode, but the “Launch Screen File” stting was not filled, yet.

You’ll need to do a bit more than that I’m afraid. I’ve pushed the change and it should be on the develop branch shortly for you to try out.


1 Like

@ed95 Works great, thank you!

1 Like

Just a quick note with many thanks - the iOSFolder workflow works a treat! :smiley: