0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

导出IOS模拟器中的沙盒数据

Posted at
  1. 打开终端

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

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

  4. 导出数据
    使用如下数据导出你当前模拟器中的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 文件目录下

    image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?