Is there a way to reset PFInstallation?
Here is a possible problematic scenario on my app:
- PFInstallation.current() created a record on the Installation table correctly
- Based on PFInstallation.current() and the installationId cached, we use cloudcode to trigger some actions. I.e. search for installation and add/remove custom subscription information into a column in that installation row.
- Imagine a situation where that installation row is accidentally removed
- PFInstallation.current() remains unchanged on the client’s phone, it is still sending the old installation ID to the server.
- The server throws Object not found exception as it cant find the installation object
- The app stucks in error mode forever, even if killed and restarted
- The only way for the client’s app to work again is to completely uninstall and reinstall the app again
Is there a way to reset/clear cache/delete PFInstallation.current()?
I found one relevant discussion here, but it feels like a hack.