iOS9.1写入文件沙箱权限问题

大概问题描述:

  1. hook微信写入/var/mobile/Library/Preferences/xxx.plist 文件写入失败,报出: Sandbox: WeChat(894) deny(1) file-write-create /private/var/mobile/Library/Preferences/xxx.plist
    在iOS9.1系统测试出现这个问题,iOS9.3.3跟8.4手机上均无问题。

2)出现这个情况后,写一个独立测试application,然后写入这个文件,写入成功。
但就是就是hook微信写入这个文件,出现沙箱权限问题。

3台手机已都越狱,8.4跟9.3.3均无问题。9.1沙箱权限问题

请教大神,这是9.1是缺什么插件还是本身越狱有问题?还是代码需要加点什么。望神解答,感激不尽。已折腾小弟一晚上。

请问有解决吗?我最近也遇到了

请问解决了吗,我也遇到了这个问题

这个要看微信装的是什么版本,越狱版,还是正版啊!

Sandbox Restrictions
Tweaks that create or edit files from a sandbox application outside the app’s container is no longer allowed

Use an XPC method to communicate with SpringBoard from the sandbox application
See CPDistributedMessagingCenter for some example code.

This way you could communicate with a SpringBoard class to get it to save or create your files

You would need to add AppSupport framework in your makefile

XXX_FRAMEWORKS = AppSupport

After the v1.1 Pangu Untether update it is no longer possible to save/create/modify the preferences from Sandboxed applications in “atomically” mode.
You will get something like this:

Sandbox: processname(PID) deny(1) file-write-unlink/file-write-create /private/var/mobile/Library/Preferences/prefs_file_name.plist

As a workaround you can just replace “atomically:YES” with “atomically:NO”:

[prefsDict writeToFile:settingsFilePath atomically:NO];

some sysctl calls and proc_* functions cannot be used in a sandbox now
trying to use these functions in a sandboxed app will throw an error like:

Sandbox: [PROCCESSNAME] deny(1) process-info-listpids

Linkhttp://iphonedevwiki.net/index.php/Updating_extensions_for_iOS_9

越狱版啊,大哥