-
Notifications
You must be signed in to change notification settings - Fork 191
User Deferrals
While the user deferrals feature was technically available in v1.0.0 of Nudge, it was only calculated per active Nudge session. After closing Nudge and re-opening, the deferral count would be reset to 0.
With v1.1.0 and higher, user deferrals are now saved and maintained across the entirety of a Nudge event.
Nudge saves the following keys in ~/Library/Preferences/com.github.macadmins.Nudge.plist
- deferRunUntil
- requiredMinimumOSVersion
- userDeferrals
- userQuitDeferrals
- userSessionDeferrals
When Nudge first opens up, it determines what Nudge event is configured for the and compares the requiredMinimumOSVersion
key of the JSON/mobileconfiguration against requiredMinimumOSVersion
key in NSUserDefaults.
If the value in your configuration is higher than the value in NSUserDefaults the following occurs:
- Log event:
New Nudge event detected - resetting all deferral values
- deferRunUntil key is deleted
- userDeferrals, userQuitDeferrals, userSessionDeferrals are reset to 0
There are two types of user deferrals: session deferrals and quit deferrals.
- Session deferrals are the amount of times Nudge was not the forefront application when the built-in nudge timer was passed.
- The count is saved to
userSessionDeferrals
- The count is saved to
- Quit deferrals are the amount of times Nudge was exited out by the user
- The count is saved to
userQuitDeferrals
- The count is saved to
Session and Quit deferrals values are combined for all Nudge logic and saved to userDeferrals