Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On iOS 11, Sticker Pack extension crashes on first launch

The first time I run my Sticker Pack extension on a simulator, I get the following crash:

2017-10-25 14:56:10.513268-0700 MobileSMS[94610:5136614] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘attempt to scroll to invalid index path: <NSIndexPath: 0x60c00023b820> {length = 2, path = 0 - 9223372036854775807}’

I didn't see an answer for this on StackOverflow, so I'm posting this question and will answer it below. Let me know if this is incorrect!

like image 954
Hunter Monk Avatar asked Oct 27 '17 01:10

Hunter Monk


1 Answers

The simulator is actually trying to scroll to the sticker pack app icon and press it. For some reason, the simulator doesn't automatically enable your sticker pack, so there isn't an icon to press.

To enable your sticker pack:

  1. On simulator, open message thread. enter image description here
  2. Tap the ellipsis (three dot) button at bottom. enter image description here
  3. Tap edit at top-right, then enable your app. enter image description here

Re-run your app and it will work! I wrote a blog post about this fix. The post is essentially the same content I've posted here.

like image 180
Hunter Monk Avatar answered Sep 30 '22 14:09

Hunter Monk