[TIMOB-28420] iOS: Unhandled native exceptions invoked via JS should show an error dialog
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-06-17T10:06:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.1 |
Components | iOS |
Labels | exception, ios, parity |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2021-04-14T03:29:12.000+0000 |
Updated | 2021-06-17T10:06:23.000+0000 |
Description
*Summary:*
When an "unhandled" JavaScript exception occurs, we display an error dialog with a stack trace to make it easy to debug. We need to do the same for native Objective-C and Swift exceptions (ie: thrown
NSException
objects) which shows both a native stack trace and JavaScript stack trace.
Currently, native exceptions are logged and then they immediately hard-crash the app.
*Note:*
I think this issue might be preventing us from posting native stack traces to our ACA (AMPLIFY Crash Analytics), but I have not confirmed this.
*Test:*
Build and run the below code on iOS.
Notice app crashes and goes back to home screen. _(Should show error dialog.)_
Ti.Filesystem.openStream(0, false);
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12721
merged to master
backport merged