-
Notifications
You must be signed in to change notification settings - Fork 27
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
automate lifecycle logging #361
base: master
Are you sure you want to change the base?
Conversation
RadarSDK/Radar.m
Outdated
|
||
[[NSNotificationCenter defaultCenter] addObserver:[self sharedInstance] | ||
selector:@selector(logTermination) | ||
name:UIApplicationWillTerminateNotification | ||
object:nil]; | ||
[[NSNotificationCenter defaultCenter] addObserver:[self sharedInstance] | ||
selector:@selector(logBackgrounding) | ||
name:UIApplicationDidEnterBackgroundNotification | ||
object:nil]; | ||
[[NSNotificationCenter defaultCenter] addObserver:[self sharedInstance] | ||
selector:@selector(logResigningActive) | ||
name:UIApplicationWillResignActiveNotification | ||
object:nil]; |
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.
Let's add some sdk config flag here to gate this.
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.
Plan will be to ship this alongside or immediately after #357
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 can add the server code and help with the sdk flag, we should add the flag to android as well. (android right now automatically logs lifecycle)
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 actually think its ok to merge this and add sdk flag later as well, since in android right now it logs lifecycle it by default.
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.
If we go that route, we'll need to call out that people need to remove their manual impl of these methods.
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.
this PR actually removes those functions, so it'll be a "breaking change", so we should either keep the functions (make them no-op, and add this lifecycle callback by default so people who didn't set it up get it as a new feature, and people who did set it up are not broken and still get the logs) or pack it with 4.0.0
2efe6e4
to
63e7687
Compare
Trying to understand why tests are failing here |
The deprecation annotation angered the linter.... The github action CI test failing is probably due to its lack of speed at the end of the day. The same failing test passed in circle CI so I would disregard them. |
Automate lifecycle logging and remove the need for users to mess with the app delegate.
This should be shipped as part of one line. It should be configured by either/both client side arguments.