Home > Back-end >  Purpose of "Main storyboard file base name" in Info.plist?
Purpose of "Main storyboard file base name" in Info.plist?

Time:01-09

In standard iOS projects, there is an entry in Info.plist that includes Main storyboard file base name. Given that view controllers can be instantiated through a storyboard object within a SceneDelegate (or from within AppDelegate) is there a reason for this entry to exist vs. deleting this entry? (one thought to keep it would be performance or compatibility?)

info.plist description

CodePudding user response:

"Main storyboard file base name" is from the days before scenes. It specified the main storyboard of your app's user interface. The initial view controller of that main storyboard is what is shown automatically on app launch. You still need this value if your app fully opts out of scenes and your app uses storyboards.

If you fully support scenes and the scene manifest section of Info.plist then "Main storyboard file base name" isn't necessary since the scene manifest specifies each scene's main storyboard.

If you don't use storyboards (such as code-only UIKit or SwiftUI) then "Main storyboard file base name" isn't necessary. In fact, a new SwiftUI project will not have this entry by default.

Default iOS Storyboard-based projects still include this entry in addition to setting the default scene manifest to the same storyboard. I think it's just a leftover from the pre-scene days.

  • Related