Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish auto UI transactions when app moves to background #4786

Open
philipphofmann opened this issue Feb 3, 2025 · 0 comments
Open

Finish auto UI transactions when app moves to background #4786

philipphofmann opened this issue Feb 3, 2025 · 0 comments

Comments

@philipphofmann
Copy link
Member

Description

Finish auto-generated UIViewController and user interaction transactions when the app moves to the background. The SentryUIViewControllerPerformanceTracker finishes the transaction on viewWillDisappear, but there might be edge cases, as when an alert appears and the app then moves to the background.

- (void)viewControllerViewWillDisappear:(UIViewController *)controller
callbackToOrigin:(void (^)(void))callbackToOrigin
{
[self finishTransaction:controller
status:kSentrySpanStatusCancelled
lifecycleMethod:@"viewWillDisappear"
callbackToOrigin:callbackToOrigin];
}

The safest approach is to finish all auto-generated UI transactions when the app moves to the background. This came up in an internal discussion around profiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant