I am using Xcode 5 in a newly created app and when I just create it I go for the run button e click on it, then the project gets built but it does not show in the iOS Simula
I have experienced this with my Tab Bar Controller not appearing in the Simulator along with a black screen. I did the following in order for my app to appear in the Simulator.
Is Initial View Controller
under the Attributes inspector tab.If you accidentally deleted that view controller, or otherwise made it not the default, then you’ll see the error “Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?” when your app launches, along with a plain black screen.
To fix the problem, open your Main.storyboard file and find whichever view controller you want to be shown when your app first runs. When it’s selected, go to the attributes inspector and check the box marked “Is Initial View Controller”. You should see a right-facing arrow appear to the left of that view controller, showing that it’s your storyboard’s entry point.
I get this error when I change the the storyboard file name "Main.storyboard" TO: "XXX.storyboard"
The solution for me was:
Good Luck
None of the above solved the issue for me. In my case it was not also setting the correct application scene manifest.
I had to change LoginScreen used to be Main
Product "Clean" was the solution for me.
Setup the window manually,
- (void)applicationDidBecomeActive:(UIApplication *)application
{
if (!application.keyWindow.rootViewController)
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *myViewController= [storyboard instantiateViewControllerWithIdentifier:@"myViewController identifier"];
application.keyWindow.rootViewController = myViewController;
}
}
If you have been committing your code to source control regularly, this may save you the hassle of creating a new Storyboard and possibly introducing more problems...
I was able to solve this by comparing the Git source code of the version that worked against the broken one. The diff showed that the first line should contain the Id of the initial view controller, in my case, initialViewController="Q7U-eo-vxw". I searched through the source code to be sure that the id existed. All I had to do was put it back and everything worked again!
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="Q7U-eo-vxw">
<dependencies>
<deployment defaultVersion="1296" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
</dependencies>
<scenes>
Here are some steps that can help you troubleshoot: