Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Self-Destructing Message iPhone App Designing and Starting the App Adding Login and Sign Up Screens

Benjamin Dirgo
Benjamin Dirgo
2,215 Points

Followed tutorial and all I got was a black screen in the simulator

I'm not sure what I am doing wrong, or how to fix it. I have tried twice now following along the "Ribbit" tutorial, and all I get is a black screen in the simulator when I hit run. When I started with the empty application it ran fine, but once I deleted the code in didFinishLaunchingWithOptions in the AppDelegate all I got was a black screen. The tabbed interface still didn't appear after creating a ViewController for the Inbox. Should they all have ViewControllers before any of them will appear?

Thank You.

Benjamin Dirgo
Benjamin Dirgo
2,215 Points

I tried targeting iOS 6.1 as well as restarting my computer as well as following the same steps on a different computer with the same version of Xcode. All with the same result, a black screen, no tabbed interface or login screen.

1 Answer

Make sure that you set the default storyboard that the project is using. Under General-> Deployment Info-> Main Interface in the project settings.

In your didFinishLaunchingWithOptions Remove the below code if using Storyboards. or add it back if not using Storyboards to set the rootViewController

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [self.window makeKeyAndVisible];
    self.window.rootViewController = yourViewController;
Benjamin Dirgo
Benjamin Dirgo
2,215 Points

The Main Interface setting did it. So simple, I don't know how I missed that step. Thank you very much. =]

Sean May
Sean May
9,547 Points

Thank you! I was having the same issue and was getting really frustrated (thought it might have been an Xcode 4 thing when I was using Xcode 5)