Issue callback listener
Single function with callback to get notified when an issue is detected by the SDK.
You can listen for and access every issue in realtime using the Fn.listenForIssue() API.
You need to add the listener in your AppDelegate class. Register only a single global listener to get callbacks for all issues detected by the SDK.
ExtensionDelegate
- Objective C
- Swift
[Fn listenForIssues:@selector(issueFound:) atTarget:self];
}
(void) issueFound:(Issue *) issue {
}
func applicationDidFinishLaunching() {
Fn.initialize(self)
Fn.listenForIssues(forSelector: #selector(issueReported(_:)), atTarget: self)
}
@objc func issueReported(_ issue:Issue){
}
The callback will have an Issue object that contains all the issue properties that are being synced to the server, making the whole process transparent.
The callback will be executed in a background thread, so make sure to use UI thread inside the callback function to implement any UI related actions. This callback is triggered right after an issue occurrence.