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!

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 Simple iPhone App with Swift Views and View Controllers Introduction to Views

My iPhone simulator that opens when pressing the play button, shows only a black screen.

When I follow the walkthrough of running the app, it brings up the simulator (although hidden behind the Xcode window), and when I select it, it is showing only a black screen.

I cannot exit the simulator, only minimize it. Unless I use the CMD+Q hotkey. Then after, Xcode brings up "The operation couldn’t be completed. (Mach error -308 - (ipc/mig) server died)".

How can I fix this, so that I can follow the rest of the tutorial?

1 Answer

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

In my experience you will have to run and then stop the app until a message comes up that says something about needing an admin password and you will need to enter it, then you will need to run the app again because xcode will lose it's connection with the simulator, this will need to be done every time you log-in to your computer.

Thanks for the advice. This however wasn't the solution for me. I just reset the settings under the iPhone Simulator application and re-ran the Xcode project again, then it refreshed and started working. I just had to zoom out to see the entire app.