NSUserDefaults:是否可以从另一个应用程序获取userDefaults? [英] NSUserDefaults: Is it possible to get userDefaults from another app?

查看:49
本文介绍了NSUserDefaults:是否可以从另一个应用程序获取userDefaults?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPhone上安装了两个应用程序(myApp和competitorApp).competitorApp使用NSUserDefaults保存用户设置.我知道所有使用competitorApp的键(值forKey).是否可以从competitorApp的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?

推荐答案

在iOS App编程指南中,,您可以阅读:

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

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

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.

这篇关于NSUserDefaults:是否可以从另一个应用程序获取userDefaults?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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