Do UILocalNotifications persist after uninstall / update?

It seems that the UILocalNotifications scheduled by our application starts even if the application is overwritten by the production application (OK, expected behavior), but also if the application is uninstalled and then installed again. Has anyone experienced this? (I double-check and save the question as a link, did not find duplicates).

+6
source share
2 answers

Relatively ... they persist after an unistall application, probably for several hours, but they do not quit.
You can test it yourself, run the application in the debug schedule, some notifications, uninstall the application, install the application again and request UIApplication for your scheduled notifications. You should see them again.
I think Apple created this template to avoid random unistallations.
If you want to remove them, create a BOOL flag in NSUserDefault to see if this is the first time the application is launched. If it deletes all notifications.
NSUserDefault not saved after unistall (Keychain yes), so when you uninstall the application, you can be sure that the notifications will be destroyed during the next installation.

+6
source

If on iOS 8.3 UILocalNotification with a delay of two minutes is planned, the application will be deleted and installed again, the notification will be launched.

0
source

Source: https://habr.com/ru/post/989681/


All Articles