Could not find a storyboard named 'Main' in bundle

Solution 1:

open the info.plist of your project and remove the selected row displayed in screenshotenter image description here

If you get a black screen ensure your new initial storyboard is selected as your main interface enter image description here

For 2021...

You must also edit UIApplicationSceneManifest. See the more recent answers below.

Solution 2:

For anyone facing this issue on Xcode 11, here's how you fix it if you face this issue when doing storyboard less project setup

(Adding some parts that ricardopereira missed)

1) First, delete the Main.storyboard file

2) Next, go to PROJECT_NAME -> GENERAL

In main interface drop-down, delete the text Main

removing reference to main from general settings

3) Now go to info.plist and delete Storyboard Name

removing reference to the storyboard from info.plist

4) Finally, modify scene(_:willConnectTo:options) code in the file SceneDelegate.swift (Yes! It's not in App Delegate anymore.)

var window: UIWindow?


    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
        // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
        // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
        guard let windowScene = (scene as? UIWindowScene) else { return }
        window = UIWindow(frame: windowScene.coordinateSpace.bounds)
        window?.windowScene = windowScene
        window?.rootViewController = ViewController()
        window?.makeKeyAndVisible()
    }

You can also refer to this video instead: https://www.youtube.com/watch?v=Htn4h51BQsk

Solution 3:

You may check the target membership of the storyboard. May be there is where the problem is:

It should be looking like this:

Target Membership