NSUserDefaults:是否可以从另一个应用程序获取 userDefaults?

发布于 2024-12-28 01:31:56 字数 125 浏览 3 评论 0原文

iPhone 上安装了两个应用程序(myApp 和竞争者应用程序)。竞争者应用程序正在使用 NSUserDefaults 保存用户设置。我知道使用竞争对手应用程序的所有键(键的值)。是否可以从竞争对手应用程序中获取 myApp 中的值?

There are two apps installed on iPhone (myApp and competitorApp).competitorApp is saving user settings with using NSUserDefaults. I know all keys (value forKey) which using competitorApp. Is it possible to get values in myApp from competitorApp?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

余生再见 2025-01-04 01:31:56

在 iOS 应用程序编程指南中,在安全部分,您可以阅读:

出于安全原因,iOS 将每个应用程序(包括其首选项)置于
和数据)在安装时位于沙箱中。沙箱是一组
细粒度的控件限制应用程序对文件的访问,
偏好、网络资源、硬件等等。作为
沙箱过程,系统将每个应用程序安装在自己的沙箱中
目录,充当应用程序及其数据的主目录。

这意味着如果您对越狱不感兴趣,您想做的事情是不可能的。

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.

誰ツ都不明白 2025-01-04 01:31:56

不可以。应用程序无法访问彼此的用户默认设置,也无法查看彼此的文件系统沙箱。这是按设计工作的安全性。

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

深府石板幽径 2025-01-04 01:31:56

越狱..更好的解决方案将用户默认值保存在某些服务器上,然后在另一个应用程序中下载。否则不可能

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文