Etep
Etep

Reputation: 543

Xcode 8 app runs on Simulator but doesn't display

I'm using the release version of xCode 8 and am trying to run my app on the simulators. They are all the iOS 10 simulators.

No matter which simulator I use, when I run the app the app icon shows up in the simulator but then that's it. The app never displays in the simulator. I only see the app icons of the iOS home screen.

I put some break points in my initial view controller at the viewDidLoad, viewWillAppear, and viewDidAppear methods. All of them triggered. So as far as my app is concerned, it is displaying on the device. I also get all the normal log output and networking calls happening just fine. It even shows the popups for permission to access the calendar and notifications. But my app is not brought to the foreground.

If I then click on the app icon in the simulator, my app runs normally. But it should be automatic when I hit run from xCode.

When I run my app on an iOS 10 device I get the same behaviour as all three of those view methods are called. However I don't get any of my normal log output. In fact I don't get any log output. However the app was already installed from when the device was on iOS 9.x. Not sure if that is a factor. But aside from the simulator issues, this is the bigger issue.

I've tried cleaning the build, deleting the app, I even tracked down the derived data folder and deleted that from the simulator. None worked. I also updated all my cocoa pods I have installed too.

Any one else experienced this?

Upvotes: 4

Views: 1896

Answers (1)

Massimo Polimeni
Massimo Polimeni

Reputation: 4906

That sounds weird but I read a lot of threads on the Apple Developer Forums on the same problem during the different Xcode 8 beta version, try these steps:

  • reset the simulator using the menu "iOS Simulator" -> "Reset Content and Settings..."
  • remove your 'xcuserdata' directory inside your .xcodeproj directory
  • do a clean build folder (hold down option key when selecting clean)
  • reboot your Mac

If these steps don't solve anything you can try this solution:

  • Copy-paste Xcode-beta.app from Applications folder to somewhere else, e.g. - Documents folder.
  • Delete Xcode-beta.app from Applications folder.
  • Move Xcode-beta.app from Documents to Applications folder again.

originally posted here, obviously using your Xcode.app instead of Xcode-beta.app.

Upvotes: 3

Related Questions