Hello.
Our app is using UITableView and supports tableView(_:trailingSwipeActionsConfigurationForRowAt:) for it.
But we are getting lots of crashes from it.
A call stack of the crash is like following.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1a221aa48 __exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib 0x1a1f41fa4 objc_exception_throw + 56 (objc-exception.mm:565)
2 CoreFoundation 0x1a211ce88 +[NSException raise:format:arguments:] + 96 (NSException.m:146)
3 Foundation 0x1a25526c4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 128 (NSException.m:231)
4 UIKitCore 0x1a63eaf8c __86-[UISwipeOccurrence _executeLifecycleForPerformedAction:sourceView:completionHandler:]_block_... + 916 (UISwipeOccurrence.m:617)
5 UIKitCore 0x1a63e5690 -[UIContextualAction _completeWithResult:] + 68 (UIContextualAction.m:95)
Our app offers two or three actions for the function `tableView(_:trailingSwipeActionsConfigurationForRowAt:)`.
And if an user selects one of them, app shows UIAlertController to get sure from the user.
And if an user select `OK` on the alert view, app processes some task in background thread and then after finishing the task, app execute the `UIContextualAction.handler.completionHandler` on main thread.
When we test it on debug and release app in our hand, it doesn't get crashed.
But from Xcode > Oganizer, there are lots of chrash.
I'm wondering why the app is getting crashed from following location.
[UISwipeOccurrence _executeLifecycleForPerformedAction:sourceView:completionHandler:]_block_... + 916 (UISwipeOccurrence.m:617)