Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local notifications not working in iOS 11

I am using local notifications in my app.

Now that iOS 11 is out there they are not working anymore. I haven't seen anything that could cause this in the release docs, does anyone know what could be causing this?

I know it's deprecated but i see no reason why it shouldn't just work anyway.

Thanks in advance

like image 998
Lyck Avatar asked Sep 20 '17 21:09

Lyck


People also ask

Why are my notifications not working on iPhone 11?

You can fix an iPhone that's not getting notifications by restarting it or making sure notifications are turned on. You should also make sure your iPhone is connected to the internet so apps can receive notifications. If all else fails, you should try resetting the iPhone — just make sure to back it up first.

How do I get notifications back on my iPhone 11?

Show recent notifications on the Lock ScreenGo to Settings > Face ID & Passcode (on an iPhone with Face ID) or Touch ID & Passcode (on other iPhone models). Enter your passcode. Scroll down and turn on Notification Center (below Allow Access When Locked).

Why am I not getting notifications even though they are turned on?

Cause of Notifications Not Showing up on AndroidDo Not Disturb or Airplane Mode is on. Either system or app notifications are disabled. Power or data settings are preventing apps from retrieving notification alerts. Outdated apps or OS software can cause apps to freeze or crash and not deliver notifications.

What is local notification in iOS?

Local notifications reach users whether your app is running in the foreground or the background and require no external infrastructure to send, which is why they are aptly termed “local.” These notifications simply require that a user's device is on in order to be received.


1 Answers

It seems there is a bug in iOS11. I can see if I schedule more than the 64 allowed notifications it ignores all the notifications I schedule.

The docs state the system keeps the soonest firing 64 notifications and discards the rest. On iOS11 it just discards them all...

So the fix in my case was to make dead-sure not to schedule more than 64 notifications.

like image 74
Lyck Avatar answered Sep 30 '22 17:09

Lyck