We have an app as part of the Amazon Appstore webapp program, which allows web-apps to natively appear in their Appstore on e.g. Kindle Fire HDX. Our problem: The app doesn't exit and clear when closed, it's eternally stored in some persistent cache, causing issues with our concept of user sessions, websockets, remote user syncing and so on (it's a massively-multiplayer virtual world). How can we force the app to properly clear itself when being closed by the user?
(In XCode settings, a comparable boolean would be "UIApplicationExitsOnSuspend"...)