I\'m getting a strange error: \'Could not find a storyboard named \'Main\' in bundle NSBundle\'
when trying to run my app on a real iOS device.
I have
choose main.storyboard, change the view as iOS 6.1 and earlier, then xcode will tell u what u need to do.
My solution is:
When i added a Seque Connection between two Views and in the Projekt Configuration the Deployment Target is less then 8.0 i get this error.
ok, easy understanding when you develop for IOS 6.0 (for example) you can't use Seque, because the Seque needs IOS 8.0 or later...... ;-)
so, i set the Deployment Target to 8.0 and the error is gone !!!! other while, i cancel all the Segue Connections and handle it with IBAction, old school ;-)
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.
Ok this has been a process. Trying so many different things. Running xcode 6.4 on OS 10.11. Having the cannot find 'Main' problem. What I finally did was move the main.storyboard off on too my desktop from Finder.Did a clean and build and quit xcode. restarted xcode now it has a red main.storyboard. i run it virtually does the same thing. then I right click on the project folder and choose the option add files to... Browse to where it is and open it. then when it is there to the right should be the identities inspector. click on the small folder under location. browse to that folder again and select choose. Then I ran and it worked. Amen !!!
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:
Selected the Main.storyboard file and tried to delete, and from the dialog that pops up as follows:
Clicked "Remove Reference" button.
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:
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:
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.
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!
The simulator is not case sensitive, but the device is. If your storyboard is called MainStoryboard, not MainStoryBoard, this will cause your problem. and aslo * dont use the extensions write only the story board name
main.storyboard -> only main is the storyboard name