My small task is, how to mail crash report? I don't know whether this example is right or wrong.
Coding:
override func viewDidLoad() {
super.viewDidLoad()
func exceptionHandler(exception : NSException) {
print("\n\n \(exception)")
print("\n\n \(exception.callStackSymbols)")
mailAcn() // SENDING MAIL ACTION WHEN EXCEPTION CAUGHT
}
NSSetUncaughtExceptionHandler(exceptionHandler) //Error: A C Function pointer cannot be formed from a local function captures context
// Do any additional setup after loading the view, typically from a nib.
}
I am following this link,, How to use NSSetUncaughtExceptionHandler to show exception message on UIView in Swift
Some unknown error is receiving. Kindly guide me, how to solve this?