CaptureStoreScreens.sh 1014 B

123456789101112131415161718
  1. #!/bin/zsh
  2. set -euo pipefail
  3. task_root="$(cd "$(dirname "$0")/../.." && pwd)"
  4. task_app="/tmp/JokerSudokuLocalSDKClean/Build/Products/Debug-iphonesimulator/JokerSudoku.app"
  5. task_bundle="com.mowhite.jokersudoku.a86a4400b4733"
  6. task_device="$1"
  7. task_family="$2"
  8. task_language="${3:-zh-Hans}"
  9. task_capture_root="$task_root/Screenshots/appstore-raw"
  10. if [[ "$task_language" != "zh-Hans" ]]; then task_capture_root="$task_capture_root/$task_language"; fi
  11. mkdir -p "$task_capture_root/$task_family"
  12. xcrun simctl install "$task_device" "$task_app"
  13. xcrun simctl status_bar "$task_device" override --time '9:41' --dataNetwork wifi --wifiMode active --wifiBars 3 --batteryState charged --batteryLevel 100
  14. for task_screen in game difficulty daily continue settings; do
  15. xcrun simctl launch --terminate-running-process "$task_device" "$task_bundle" -joker-preview "$task_screen" -joker-language "$task_language"
  16. sleep 8
  17. xcrun simctl io "$task_device" screenshot "$task_capture_root/$task_family/$task_screen.png"
  18. done