从沙箱中的帮助应用程序读取NSUserDefaults [英] Reading NSUserDefaults from helper app in the sandbox

查看:168
本文介绍了从沙箱中的帮助应用程序读取NSUserDefaults的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在阅读另一个应用程序的 NSUserDefaults 时发现了一些资源。

I found some resources on reading the NSUserDefaults of another application.

Objective-C NSUserDefaults缓存可防止其他应用程序正确读取更改

NSUserDefaults:是否可以从其他应用程序获取userDefaults?

显然,这是不可能的。
但是问题首先与iOS相关,其次两个应用程序是完全不同的。

Apparently, it's not possible. However the questions firstly relate to iOS, and secondly the two apps are completely different.

我有一个 LaunchAtLogin 助手应用程序。但它也做了一些其他任务。
因此,辅助应用程序应该始终运行,但只有在 NSUserDefaults BOOL >

I have a LaunchAtLogin helper app. But it does some other tasks too. Therefore, the helper app should run always, but only start the main app if the BOOL in the NSUserDefaults is set.

有没有办法实现呢?

推荐答案

自10.7.4之后,您可以在沙箱中使用应用程序组。组中的所有应用程序共享同一个沙箱。请参阅应用程序组,了解如何设置这些。

Since 10.7.4 you can use Application Groups within the sandbox. All applications within the group share the same sandbox. See Application Groups on how to set these up.

这篇关于从沙箱中的帮助应用程序读取NSUserDefaults的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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