-1

Is there a way to send local notifications only when the iphone is unlocked? I don't want to send local notifications while the iphone is locked. Thanks

Brandon
  • 11

1 Answers1

-1

If you’re scheduling them in advance, no; if you’re using -presentLocalNotificationNow: from an app that’s running in the background, you should be able to use the UIApplication protectedDataAvailable property to check whether the device is unlocked at the time. You can also ask your users to turn off the “Show on Lock Screen” switch in the notification settings for your app.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131