0

I'm trying to implement application crash report mechanism in locally using swift 5.1. In here, I'm trying to write Exception and Runtime errors to particular file which in application sandbox level. I'm checking good place of class level catch exception and runtime errors. I followed this link How should I use NSSetUncaughtExceptionHandler in Swift, but according to that, we cannot catch Swift run time errors. I checked other answers and many of them are outdated, we are using ios 13. Can someone suggest good way to track all errors and system crashes? I really appreciate your help and comments.

1 Answers1

0

This is the good way to implement own crash report feature in application.

https://github.com/zixun/CrashEye/blob/master/CrashEye/Classes/CrashEye.swift

We can call add function like below way in AppDelegate class.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    CrashEye.add(delegate: self)
    return true
  }