As of iOS10 I have users complaining that my app keeps on crashing at random and especially when the screen was locked. When they unlock the screen, they can see the app for a second and then it crashes. In the logs I can see many entries like these:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'There doesn't seem to be a valid compiled storyboard at path '/var/containers/Bundle/Application/serialcode/XXX.app/AppLaunchStoryboard.storyboardc'' *** First throw call stack: (0x1d465e07 0x1c6cb077 0x22c14083 0xe7d55 0x115ae7 0xbe37d 0x2252897f 0x22726e9d 0x1ed151e1 0x1dd46419 0x1dcc5743 0x1ec98f3f 0x1ed0f3d1 0x1ed1503d 0x227276fd 0x227273c1 0x22a2fa07 0x1ecfef2d 0x1ed2a9cb 0x1ed2a885 0x1ed2ab6f 0x1d421c8b 0x1d421795 0x1d41fa6b 0x1d36f073 0x1d36ee81 0x1eb17bfd 0x2250fccf 0x2250a401 0xbf879 0x1cb3a50b) libc++abi.dylib: terminating with uncaught exception of type NSException
The "invalid" file is usually AppLaunchStoryboard.storyboard
allthough I have also seen references to other storyboard files and .xib files.
Googling the above error points to incorrect build settings in XCode related to iOS architectures which I have double-checked. If my app wasn't being built for the right architectures, surely the app wouldn't even have been able to run in the first place?
This problem is NOT reliably reproducible, it can happen at any time.
Any suggestions will be much appreciated.