-
打开终端
-
找到模拟器的位置
模拟器的位置通常位于一下路径
~/Library/Developer/CoreSimulator/Devices/
在这个目录下,你可以看多个以UUID命名的文件夹,每一个文件夹对应一个模拟器设备

-
确定当前使用的模拟器的 UUID
使用xcrun simctl lists命令查看当前系统中所有的模拟器,找到你当前正在使用的模拟器,旁边有该模拟器的 UUID

-
导出数据
使用如下数据导出你当前模拟器中的app的数据cp -R $(xcrun simctl get_app_container <device-uuid> <app-bundle-id> data) ~/Download- 将
<device-uuid>替换为你的模拟器的UUID - 将
<app-bundle-id>替换为你应用的 bundle id - 该命令是将模拟器中的指定app的数据导出到 Download 文件目录下
- 将
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
