pub unsafe trait SACrashDetectionDelegate: NSObjectProtocol {
// Provided method
unsafe fn crashDetectionManager_didDetectEvent(
&self,
crash_detection_manager: &SACrashDetectionManager,
event: &SACrashDetectionEvent,
)
where Self: Sized + Message { ... }
}SACrashDetectionManager only.Expand description
SACrashDetectionDelegate
SACrashDetectionManager notifies its delegate about Crash Detection related information using this protocol.
See also: SACrashDetectionManager
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn crashDetectionManager_didDetectEvent(
&self,
crash_detection_manager: &SACrashDetectionManager,
event: &SACrashDetectionEvent,
)
Available on crate feature SACrashDetectionEvent only.
unsafe fn crashDetectionManager_didDetectEvent( &self, crash_detection_manager: &SACrashDetectionManager, event: &SACrashDetectionEvent, )
SACrashDetectionEvent only.Update the delegate with a new Crash Detection event
Crash Detection events may occur when the app is not running. Following a Crash Detection event, the system will launch the iOS app in the background giving it small amount of background execution time. This time should be used for critical tasks related to the Crash Event. For example: placing a network request or scheduling a local notification. In order to receive Crash Detection events, create a new SACrashDetectionManager instance and set its delegate early in the iOS app lifecycle (applicationDidFinishLaunching for example).
If multiple Crash Detection events are generated while the app is not running, only the most recent event will be reported on the next app launch.
The same event may be reported across different app launches, always check the date of the event before processing it.
Crash Detection events can be simulated with the iOS simulator. Use it to test the background functionality of your app.