A Boolean value indicating whether your app should stop performing background activity and resume at a more optimal time.
- macOS 10.10+
Your app can check the
should property while executing scheduled background activity. If this property contains a value of
true, system conditions have changed since the time the activity started and deferral is recommended. For example, perhaps the user unplugged the Mac and it’s now running on battery power. In this case, your app should finish what it’s currently doing, save its state, and invoke its completion handler with a value of
NSBackground. The system will invoke your activity again at a more optimal time, and your app can restore its previous state and resume where it left off. See Detect Whether to Defer Activity and Configure Scheduler Properties.