It seems that UILocalNotifications scheduled by our app are fired even if the app gets overwritten with the production app (OK, expected behaviour) but also if the app gets uninstalled and then installed again. Did anyone experience this? (I am double checking and keeping the question as reference, did not find any duplicates).
Do UILocalNotifications persist after uninstall/update?
185 Views Asked by Fr4ncis At
2
Sort of... they persists after unistall of the app probably for some hours, but they are not fired.
You can test by yourself, launch your app in debug schedule some notifications, delete the app, install the app again and ask
UIApplicationfor its scheduled notifications. You should see them again.I think that Apple created this pattern to avoid accidental unistallations.
If you want to delete them create a BOOL flag in
NSUserDefaultto understand if it is the app first launch. If it is delete all the notifications.NSUSerDefaultdoesn't persist after unistall (Keychain yes), so when you delete the app you can be sure that at the next install notifications will be wiped out.