-
Notifications
You must be signed in to change notification settings - Fork 101
feat: Allow for more granular tracked lifecycle events to track #385
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
Conversation
I can't merge this as it breaks the API. The optimal way to do this is disable lifecycle events, and track on the ones you do, either in your code or via a plugin similar to the lifecycle plugin in this codebase. |
@bsneed I made sure the API wasn't broken when implementing this, would you mind explaining a bit more? I don't mind refactoring it... |
@delannoyk you totally did! I'm so sorry I missed that. I shoulda dug deeper, so thanks for inquiring about it. I'll reopen this and give it a whirl in just a bit. |
@bsneed appreciate it, but also no pressure! I was just wondering. Thanks for considering it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. I'll need to verify a recent add of appWillTerminate and can get this merged and do those fix-ups. Thanks @delannoyk !
@@ -29,12 +29,12 @@ public class ObjCConfiguration: NSObject { | |||
|
|||
/// Opt-in/out of tracking lifecycle events. The default value is `false`. | |||
@objc | |||
public var trackApplicationLifecycleEvents: Bool { | |||
public var trackApplicationLifecycleEvents: TrackedLifecycleEvent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to stay as a bool to preserve compatibility. can change it on my end though.
Merged with fix-ups in #396 |
Hi Segment team 👋🏻,
We found ourselves not wanting to track all the lifecycle events in our app. As far as I can tell there was no way to filter them so I implemented this as an OptionSet instead of a boolean value.
Let me know if this is acceptable and/or if you have any questions or suggestions.
Thanks.
Kevin