开发者

Is there a way for the user to completely reset an iOS app (delete its userdata etc)?

开发者 https://www.devze.com 2023-03-17 11:26 出处:网络
I have an iOS app that stores some data in a sqlite database. The app is shipped with a pre-filled database and that database is copied to userdata folder if it doesn\'t exist and use that for read-wr

I have an iOS app that stores some data in a sqlite database. The app is shipped with a pre-filled database and that database is copied to userdata folder if it doesn't exist and use that for read-writes.

My question is, is it possible to remove/reset an app in a way that the next time it is installed (or run) it is as if the app got installed for the first time? Should I provide it programmatically? Or is the user able to 开发者_高级运维do it somehow?


Deleting the app and reinstalling it will delete the contents of the bundle. All of your data is stored in the bundle so that will reset the app.

You could also perform the reset in the app by copying your "virgin" files over the top of your live files.

0

精彩评论

暂无评论...
验证码 换一张
取 消