iMessage Apps Crash in Simulator with Xcode 9.1

Since updating to Xcode 9.1, I've been unable to run any iMessage app in Simulator. Upon running, apps immediately crash with the following message:


Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'attempt to scroll to invalid index path: {length = 2, path = 0 - 9223372036854775807}'


The crash occurs when running projects created using the iMessage App template (with no changes) and happens in every simulator.


I encountered this issue often in Xcode 9.0, but was able to get around it by using "Erase All Content and Settings" in Simulator. However, that solution no longer works and I cannot use Simulator for testing iMessage apps in Xcode 9.1. Fortunately, everything is fine on an actual device.


Is anyone else having this issue?


macOS High Sierra v10.13 Beta (17A362a)
Xcode v9.1 (9B55)

I reported this issues to Apple. It was closed and marked as a duplicate of 35018746. Note that while Xcode 9.0.1 works some of the time, I'm still running into the above issue very often—even after using "Erase All Content and Settings" in Simulator. If anyone has a fix that works reliably in Xcode 9.0.1 or 9.1, I'd love to hear it.

Somehow I missed the discussion over here. The response from nink worked for me in both Xcode 9.0.1 and 9.1. Perhaps I'd done it without realizing while using 9.0.1, which lead me to believe it was less prone to crashing initially. Anyway, I'll reiterate it for clarity:


  1. The first time you launch the app in Simulator, it may crash. Launch Messages again and tap the white and grey "More" / ellipses icon—it's the last icon in the app drawer.
  2. Tap the "Edit" button to show additional apps in the "MORE APPS" section.
  3. Toggle the switch that corresponds to your app to the on position.
  4. Tap the "Done" button.


Next time you build and run in Simulator, it might just work.

I'm having the same issue - crashes both my shipping iMessage app as well as a brand new sticker pack app that I built to test. Really hoping a fix comes soon..

This worked for me too - thanks!

iMessage Apps Crash in Simulator with Xcode 9.1
 
 
Q