Narek  Simonyan Narek Simonyan - 5 months ago 53
Swift Question

Handle all unhandled exceptions swift

Is there any function like this

void App_UnhandledException(object sender, UnhandledExceptionEventArgs

like in windows phone,for handling all exceptions to send to my server


You can set NSSetUncaughtExceptionHandler in your AppDelegate, refer to this post

But Swift does not fully support it, as explain in this post, you need to do it in Objective-C


Thanks for Martin R's comment, Swift now supports it.