开发者

Would the value of NSUserDefault lost after upgrade the app?

Would the value of NSUserDefaults lost after upgrade the app?

If I delete the开发者_开发知识库 app and reinstall it ,and then restore data from Itunes backup, would the value of NSUserDefaults lost?


You don't lose the value of NSUserDefaults when you upgrade the app.

When you delete and reinstall the app, though, you reset all the NSUserDefaults keys, so you can lose data (i.e. your score, etc). Restoring from backup doesn't lose the NSUserDefaults value, due you've stored the value in iTunes and iTunes is giving you back again that value.


iCloud is the better solution unless you have some reason for not using it, and has the advantage of synchronizing multiple installations by the same user should you so desire.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜