_Platform:_
iOS
The version of the SDK (See pubspec.lock): 4.0.1
I have the following issue:
The sentry-cocoa SDK doesn't start a session on the first launch of the app, because SentrySessionTracker.didBecomeActive doesn't fire. If you put the app in the background and open it again didBecomeActive fires. I'm not sure if we need to fix this in sentry-cocoa, in sentry-flutter, or both.
Steps to reproduce:
Actual result:
The SDK doesn't send a session.
Expected result:
The SDK should send a healthy session.
This is related to https://github.com/getsentry/sentry-react-native/issues/1292
@philipphofmann this is an issue on RN SDK or Flutter SDK?
It's an issue on both SDKs.
@philipphofmann interesting, wondering if something has changed on the cocoa sdk, because this has been tested on flutter and RN by @bruno-garcia and @jennmueng as well.
Nothing really changed on the Cocoa side. I also don't fully understand why this is an issue now, as you tested this on both Flutter and RN. Maybe I'm mistaken, but I opened up these issues yesterday to document what I found.
I'll give it a try, thx
edit: tested it on Android, it worked well.
on iOS, I could reproduce it using iPhone 12 mini, release mode.
the notification UIApplicationDidBecomeActiveNotification on iOS is triggered before the SDK had the chance to register into it.
the notification UIApplicationDidBecomeActiveNotification on iOS is triggered before the SDK had the chance to register into it.
That's also what I would have guessed.
So either we init Cocoa sooner or we somehow push the Flutter like event down to Cocoa.