Skip to content

Commit

Permalink
Update screenshots script
Browse files Browse the repository at this point in the history
  • Loading branch information
mbernson committed Jan 24, 2025
1 parent 5dcd953 commit c799ff2
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions screenshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# This script automates the process of taking screenshots for the App Store.
# It uses UI tests target, which are configured in the Screenshots test plan.
# The final screenshots are saved in a folder named 'screenshots'.

set -e

Expand All @@ -17,23 +18,7 @@ then
exit 1
fi

# xcrun simctl create "iPhone 15 Plus" "iPhone 15 Plus" "iOS17.5"
# xcrun simctl create "iPhone 8 Plus" "iPhone 8 Plus" "iOS16.4"
# xcrun simctl create "iPad Pro 13-inch (M4)" "iPad Pro 13-inch (M4)" "iOS17.5"
# xcrun simctl create "iPad Pro (12.9-inch) (2nd generation)" "iPad Pro (12.9-inch) (2nd generation)" "iOS17.5"

# xcodebuild -verbose \
# -project "CCCTube.xcodeproj" \
# -scheme "CCCTube" \
# -destination "platform=iOS Simulator,name=iPhone 8 Plus" \
# -destination "platform=iOS Simulator,name=iPhone 15 Plus" \
# -destination "platform=iOS Simulator,name=iPad Pro 13-inch (M4)" \
# -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)" \
# -resultBundlePath "./Screenshots.xcresult" \
# -testPlan Screenshots \
# clean test

declare -a destinations=("platform=iOS Simulator,name=iPhone 8 Plus" "platform=iOS Simulator,name=iPhone 15 Plus" "platform=iOS Simulator,name=iPad Pro 13-inch (M4)" "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)")
declare -a destinations=("platform=iOS Simulator,name=iPhone 16 Plus" "platform=iOS Simulator,name=iPad Pro 13-inch (M4)")

rm -rf ./screenshots
mkdir ./screenshots
Expand All @@ -47,7 +32,7 @@ echo "Taking screenshots for $destination"
xcodebuild -quiet \
-project "CCCTube.xcodeproj" \
-scheme "CCCTube" \
-destination "platform=iOS Simulator,name=iPhone 15 Plus" \
-destination "$destination" \
-resultBundlePath "./Screenshots.xcresult" \
-testPlan Screenshots \
clean test
Expand All @@ -58,5 +43,3 @@ done

# Remove alpha channel from the screenshots, otherwise the App Store will reject them
find ./screenshots -name "*.png" -exec convert "{}" -alpha off "{}" \;

open ./screenshots

0 comments on commit c799ff2

Please sign in to comment.