一、ifuse

ifuse 是一个文件系统工具,在未越狱的设备上可以挂载 App 的文件夹,在已越狱的设备上可以挂载根文件夹

This project allows mounting various directories of an iOS device locally using the FUSE file system interface.

二、安装

利用 Homebrew 进行安装:

// 期间可能需要输入电脑密码
brew install macfuse
brew install ifuse

安装时可能出现错误:

a146fb09dc7470ed5292740e7c6b29cc

// 编辑 ifuse 的安装配置
vim `brew formula ifuse`

// 注释或删除以下几行
#  on_macos do
#    disable! date: "2021-04-08", because: "requires closed-source macFUSE"
#  end

// 重新安装
brew install ifuse

aca212e2910b38571d8a47a185bdbfe7

三、使用

1. 挂载

// 新建挂载点文件夹
mkdir ~/Sandbox

// 设置挂载点
ifuse --container ifuse.test ~/Sandbox

此时 ifuse.test 的沙盒被成功挂载到 Sandbox 文件夹:

ae545a6f0fd48b5e211502e8b50ca8ea

2. 可能出现错误:

e2fcc9c3d296790a5aea433daea117eb

ad94f6eb0e29eca07f11257be5024b60

需要在 Info.plist 添加 key UIFileSharingEnabled value YES,重新编译即可。