Ảnh chụp màn hình trên Simulator thường được lưu trên Desktop của Mac. Tuy nhiên, vị trí và tên file phụ thuộc vào cách chụp:
1. Phím tắt Simulator: Command + S hoặc Menu File > New Screenshot
- Vị trí: Desktop
- Tên file:
Simulator Screen Shot - [Tên thiết bị] - [YYYY-MM-DD] at [HH.MM.SS].png - Ví dụ:
Simulator Screen Shot - iPhone 14 Pro - 2023-12-25 at 14.30.45.png
2. Phím tắt macOS: Command + Shift + 3 (toàn màn hình) / 4 (chọn vùng)
- Vị trí: Desktop
- Tên file:
Screen Shot [YYYY-MM-DD] at [HH.MM.SS AM/PM].png - Ví dụ:
Screen Shot 2023-12-25 at 2.30.45 PM.png
3. Lưu từ trong app chạy trên Simulator (UIImageWriteToSavedPhotosAlbum)
- Vị trí: Thư mục dữ liệu của Simulator cụ thể
- Đường dẫn:
~/Library/Developer/CoreSimulator/Devices/[UDID]/data/Media/DCIM/ - UDID: Xem trong Xcode > Window > Devices and Simulators.
Mẹo tìm nhanh
- Mở Finder, nhấn Command + Shift + G, dán đường dẫn
~/Library/Developer/CoreSimulator/Devices/. - Hoặc trong Simulator: Menu File > New Screenshot > ảnh xuất hiện trên Desktop ngay lập tức.
- Đổi vị trí lưu mặc định macOS Screenshot: Mở Screenshot app (Command+Shift+5) > Options > Save to.