当卸载放置在那里的应用程序时,是否删除了存储在NSUserDefaults中的值? [英] Are values stored in NSUserDefaults removed when the app that put them there is uninstalled?

查看:483
本文介绍了当卸载放置在那里的应用程序时,是否删除了存储在NSUserDefaults中的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我将一个令牌(一个字符串)放入NSUserDefaults,假设作为一个参数传递给应用程序使用的REST API,并且该应用程序已卸载,该字符串是否仍保留在设备上?

If I put a token (a string) into NSUserDefaults, lets say as a paramter passed to a REST API that is used by the app, and the app is uninstalled, will the string remain on the device?

推荐答案

不,它不会。我以完全相同的方式使用NSUserDefaults,并且在删除应用程序后它不会停留。如果需要,您可以通过管理器对此进行验证。

No, it will not. I use NSUserDefaults in the exact same manner, and it will not stay after the app is deleted. You can verify this via Organizer if you need to.

然而,它会持续更新。我一直在使用 TestFlightApp 进行所有beta测试,并且令牌(以及其他已保存的用户默认数据)仍然存在。希望这会有所帮助。

It will however persist through updates. I have been using TestFlightApp for all of my beta testing, and the token (and other saved user default data) remains. Hope this helps.

这篇关于当卸载放置在那里的应用程序时,是否删除了存储在NSUserDefaults中的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆