Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 185 Vote(s) - 3.44 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could not find a storyboard named 'Main' in bundle

#11
As Kalpit Gajera has said, "open the info.plist of your project and remove the selected row displayed in screenshot". You simply remove 'Main storyboard file base name' from the Info.plist. After you remove it, clean and run, the program will no longer fail but will show a black screen. Open Info.plist again and manually add the row back in. Problem solved.
Reply

#12
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][1]][1]


[1]:
Reply

#13
#Could not find a storyboard named 'Main' in bundle

**Reason I could think of:**

As far as my iOS knowledge concluded me, this was just happened because the XCode was unable to find the reference to the Main.storyboard file within my project directory to copy it into the App.

**Resolution:**

1. Selected the Main.storyboard file and tried to delete, and from the dialog that pops up as follows:
[![enter image description here][1]][1]

2. Clicked "Remove Reference" button.

3. Then, from the actual place where I could find the Main.storyboard file within the project directory, dragged, and dropped to the XCode, and again from the dialog that pops up as follows:
[![enter image description here][2]][2]

4. I choosed, "Create folder references" (because that's one thing I intended to do because I've changed my project's file and folder structure). But most of the times choosing "Create groups" also might work. And clicked on "Finish" button. My Storyboard files were already within as shown in the screenshot already within a `Base.lproj` directory as follows: <br/><br/>
[![enter image description here][3]][3]

**Note:** One important thing to remind here at this step is, don't forget to tick it ON the checkbox "Add to targets" to your app.

5. Clean the Product, re-build, and if it is successful, most of the time try running it will be successful.

Hope this might be helpful to somebody else out there! I tried this on XCode 7.3.1 and on iOS Sim 9.3 and iPhone 6S!

[1]:

[2]:

[3]:
Reply

#14
1. Open you storyboard file
2. Then Click File Inspector
3. Then select "Target Membership" and check your project
4. Do the same for ViewController file **!!!important part if you use ViewController.swift or ViewController.m with your storyboard!!!**
Reply

#15
Two different solutions that worked for me after upgrading to Xcode 10.1:

- In **File->Workspace (or Project) Settings**. Switch to **Legacy Build System**.

- In your targets **Build Phases**, remove the **Base.lproj** folder from **Copy Bundle Resources** (if listed) and make sure each of your storyboards are listed and copied separately instead.

After applying either of the fixes above make sure you **Clean Build Folder** from the Product menu once, otherwise the fixes might not work properly.
Reply

#16
My issue was resolved by removing the `.xml` suffix from the `Main.storyboard.xml file`.

Apparently, the suffix changed from the version from which I imported the project.

Therefore, renaming the file (removing the `.xml` suffix) and restarting, then `Project-> clean....` fixed the problem.
Reply

#17
In a project that uses **`UIScene`** in iOS 13 and Xcode 11, you need to remove the `UISceneStoryboardFile` key from the `.plist`.

### Xcode 11:

[![xcode11-uiscene][1]][1]

### Changing directly from the file:

[![uiscene-plist][2]][2]


[1]:

[2]:
Reply

#18
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*<br>

(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][1]][1]

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

[![removing reference to the storyboard from info.plist][2]][2]

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:

[1]:

[2]:
Reply

#19
## Swift 5.1 & xCode 11.2 ##
In my case, I forgot to change **`Storyboard Name`** in **`Info.plist`**

[![enter image description here][1]][1]

**`Info.plist`** source code
```
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>AccountViewController</string>
</dict>
</array>
</dict>
</dict>
```


[1]:
Reply

#20
An update for applications created for iOS 13.0 and above. (Xcode 11)

If you get the error "Could not find a storyboard named 'Main' in bundle even after changing the "Main storyboard File base name" in the info.plist and "Main Interface" under Deployment in Target.

Then you have to change another entry in the info.plist file.

1. Open the info.plist file.
2. Expand "Application Scene Manifest".
3. Expand "Scene Configuration".
4. Expand the item 0 under "Application Sessions Role" and then change the storyboard name there.

[![enter image description here][1]][1]

And your application will start working.


[1]:
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through