-
-
Notifications
You must be signed in to change notification settings - Fork 362
Description
Description
Problem description
There's a notification exposed for hybrid SDKs which they're supposed to call when an app becomes active (SentryHybridSdkDidBecomeActive
). This is because if the app was already active at the time the normal DidBecomeActive notification is registered, it would never get triggered.
The problem with this solution is that it shifts the issues to all individual consuming SDKs (which is bound to fail one way or another, not even taking into account that they need to figure out they're supposed to call this) instead of implementing it here.
Additionally, I wonder how this isn't a problem for anyone else initializing the SDK later while the app is already running? I.e. not talking about hybrid SDKs but any app using the Cocoa SDK.
Proposal:
How about we change the logic and automatically do what SentryHybridSdkDidBecomeActive
does, i.e. start session if session tracking is enabled. Track OOM, etc.
We can first check that the app is in the foreground.
Context
Found this out when figuring out getsentry/sentry-dart#2412 (comment) with a fix in getsentry/sentry-dart#2452
Metadata
Metadata
Assignees
Labels
Type
Projects
Status