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

[iOS] "newSessionBegan" is not tracked on app launch for older apps without SceneDelegate #113

Closed
dreymonde opened this issue Aug 15, 2023 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@dreymonde
Copy link

Quoting the code:

    /// If `true`, sends a "newSessionBegan" Signal on each app foreground or cold launch
    ///
    /// Defaults to true. Set to false to prevent automatically sending this signal.
    public var sendNewSessionBeganSignal: Bool = true

It relies on UIApplication.willEnterForegroundNotification, and, for some reason, allegedly since iOS 14 for apps that do not support SceneDelegate, this notification is not fired on launch, puzzlingly. And considering that there are still many such apps like it out there, I think this should be addressed.

I've made a simple minimal example project that reproduces this issue. Setting a breakpoint at func processSignal(_ signalType: TelemetrySignalType, for clientUser: String? = nil, floatValue: Double? = nil, with additionalPayload: [String: String] = [:], configuration: TelemetryManagerConfiguration) will quickly show that the event is not being fired

TelemetryDeckNewSessionReproduce.zip

Let me know if you have any questions

@dreymonde
Copy link
Author

@winsmith
Copy link
Contributor

Thanks for this report! I'll look into it!

@winsmith winsmith added bug Something isn't working enhancement New feature or request labels Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants