I’ve just implemented SceneDelegate to my old iOS project which has two storyboards – iPhone.storyboard
and iPad.storyboard
.
There are both AppDelegate.swift
and SceneDelegate.swift
files without specific codes – just empty delegate methods.
The problem is that I have to change the storyboard name whenever I run with different device types – iPhone or iPad. My questions is how I can set multiple storyboard names to Application Scene Manifest
section of info.plist
file. It obviously runs with iPad.Storyboard
file when I run with iPhone simulator for now.
P.S. I’ve already set Main storyboard file base name
and Main storyboard file base name (iPad)
values with iPhone
and iPad
.
2
Answers
The only variant that I found for now is this where setting different storyboards are done in SceneDelegate. Not at the info.plist.
I had this problem, what you need to do is add a new scene configuration in the info.plist. I used the default one to load a storyboard for iPhones, and added a new configuration to load my iPad storyboard.
Change ‘Enable Multiple Windows’ to ‘YES’
Then in the AppDelegate.swift –
This solved it for me, I hope this helps people.