NSUserDefaults: Is it possible to get userDefaults from another app?

こ雲淡風輕ζ 提交于 2019-12-01 17:46:45

In the iOS App Programming Guide, in the Security section you can read:

For security reasons, iOS places each app (including its preferences and data) in a sandbox at install time. A sandbox is a set of fine-grained controls that limit the app’s access to files, preferences, network resources, hardware, and so on. As part of the sandboxing process, the system installs each app in its own sandbox directory, which acts as the home for the app and its data.

That means that if you're not interested in jailbreaking, what you want to do is not possible.

No. Apps cannot access each other's user defaults, nor look inside each other's file system sandboxes. This is security working as designed.

Jailbreak.. Better solution to save userdefaults values on some server and then download it in another app. Not possible otherwise

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!