Skip to main content

Lifecycle events

Bugsee SDK silently works within your app and recording everything to assist you in debugging when something unexpected happens. Our SDK is designed as a black box, but there may be cases when you want to be notified about changes/events within Bugsee itself. Lifecycle events are designed exactly for that. Each time when internal state changes or some important event is raised, lifecycle event is dispatched to the user code.

Implementing callback

Your class should implement BugseeDelegate protocol and it must set itself as the delegate for Bugsee. You should implement the following callback to be notified about lifecycle changes:

- (void)bugseeLifecycleEvent:(BugseeLifecycleEventType)eventType {
// Handle lifecycle event here...
}

Available lifecycle events

NameDescription
BugseeLifecycleEventLaunchedEvent is dispatched when Bugsee was successfully launched
BugseeLifecycleEventStartedEvent is dispatched when Bugsee is started after being stopped
BugseeLifecycleEventStoppedEvent is dispatched when Bugsee is stopped
BugseeLifecycleEventResumedEvent is dispatched when Bugsee recording is resumed after being paused
BugseeLifecycleEventPausedEvent is dispatched when Bugsee recording is paused
BugseeLifecycleEventRelaunchedAfterCrashEvent is dispatched when Bugsee is launched and pending crash report is discovered. That usually means that app was relaunched after crash.
BugseeLifecycleEventBeforeReportShownEvent is dispatched before the reporting UI is shown
BugseeLifecycleEventAfterReportShownEvent is dispatched when reporting UI is shown
BugseeLifecycleEventBeforeReportUploadedEvent is dispatched when report is about to be uploaded to the server
BugseeLifecycleEventAfterReportUploadedEvent is dispatched when report was successfully uploaded to the server
BugseeLifecycleEventReportUploadFailedWithFutureRetryEvent is dispatched after bug/error/crash report upload failed and will be retried in the future
BugseeLifecycleEventReportUploadFailedEvent is dispatched after multiple bug/error/crash report upload attempts ended with failure. It indicates no more attempts will be taken and the report will not be uploaded
BugseeLifecycleEventBeforeFeedbackShownEvent is dispatched before the Feedback controller is shown
BugseeLifecycleEventAfterFeedbackShownEvent is dispatched after the Feedback controller is shown
BugseeLifecycleEventBeforeReportAssembledEvent is dispatched right before bug/error/crash report is about to be assembled
BugseeLifecycleEventAfterReportAssembledEvent is dispatched right after bug/error/crash report is assembled