SACrashDetectionDelegate

Trait SACrashDetectionDelegate 

Source
pub unsafe trait SACrashDetectionDelegate: NSObjectProtocol {
    // Provided method
    unsafe fn crashDetectionManager_didDetectEvent(
        &self,
        crash_detection_manager: &SACrashDetectionManager,
        event: &SACrashDetectionEvent,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature 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§

Source

unsafe fn crashDetectionManager_didDetectEvent( &self, crash_detection_manager: &SACrashDetectionManager, event: &SACrashDetectionEvent, )
where Self: Sized + Message,

Available on crate feature 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.

Trait Implementations§

Source§

impl ProtocolType for dyn SACrashDetectionDelegate

Source§

const NAME: &'static str = "SACrashDetectionDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn SACrashDetectionDelegate

Implementations on Foreign Types§

Source§

impl<T> SACrashDetectionDelegate for ProtocolObject<T>

Implementors§