I dont like asking vague questions but I couldnt exactly tell what the problem is.
In my app I set some daily local notifications. Shooting everyday at 200PM. I later removed the codes that sets the local notifications, and added push notification feature.
I test the push and it works (whenever I want to). But I still get the old notifications as well, could it be because I set them earlier somewhere on the phone itself. Is there a way to cancel them without coding. For example are they cancelled if I remove the app?
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.
The essential difference between local notifications and push notifications is simple: Local notifications are scheduled by an app locally and are delivered by the same device. Push notifications are sent by a remote server (its provider) which sends these notifications to devices on which the app is installed.
As you are already aware, you can schedule maximum of 64 notifications per app. If you add more than that, the system will keep the soonest firing 64 notifications and will discard the other.
Uninstalling the app will remove the local notifications, although some people have reported that they are cached for up to 24 hours (so if you delete the app, don't reinstall it for more than 24 hours) See here for more details.
Otherwise, if you still have access to the code you can cancel all local notifications like this:
[[UIApplication sharedApplication] cancelAllLocalNotifications];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With