Self destruct the app


I was wondering how you would go about self destructing the app?

Beyond deleting local storage keys, I would consider using the native file component (ios, android only of course), to try to delete all files of the app, especially main.js and the assets. As I use ionic deploy, I would need to destroy the auto update settings as well (channel, appid).

I haven’t tried it yet (if it is possilbe), but what would be your strategy?

Use case: after detecting failed logins or locked user, ignite the self-destruct. (Corporate app)



I’m no expert at all but I don’t think it is possible to delete main.js from within the app.

My strategy would be to design the app such that the app itself contains no sensitive data at all. All data comes from a server where authentication is required. If offline support is necessary, you can store the data in a local database. Then to do the ‘self-destruction’, all you have to do is wipe the local database and lock that user on the server.

1 Like