-
Notifications
You must be signed in to change notification settings - Fork 4
/
take-screenshots
executable file
·44 lines (39 loc) · 1.11 KB
/
take-screenshots
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
declare -a devices=( \
"iPhone 8" \
"iPhone 8 Plus" \
"iPhone 11 Pro" \
"iPhone 11 Pro Max" \
"iPad (7th generation)" \
"iPad Pro (11-inch) (2nd generation)" \
"iPad Pro (12.9-inch) (4th generation)" \
)
for device in "${devices[@]}"
do
echo "Booting $device"
xcrun simctl boot "$device"
echo "Configuring $device"
xcrun simctl status_bar "$device" override \
--batteryLevel 100 \
--cellularBars 4 \
--time "9:41"
done
xcodebuild \
-scheme FOSDEM \
-sdk iphonesimulator \
-derivedDataPath ./Build/ \
-destination "name=iPhone 8" \
-destination "name=iPhone 8 Plus" \
-destination "name=iPhone 11 Pro" \
-destination "name=iPhone 11 Pro Max" \
-destination "name=iPad (7th generation)" \
-destination "name=iPad Pro (11-inch) (2nd generation)" \
-destination "name=iPad Pro (12.9-inch) (4th generation)" \
-only-testing UITests/ScreenshotTests/testScreenshots \
test
find ./Build/Logs/Test -name \*.xcresult -maxdepth 1 -exec xcparse screenshots {} ./Screenshots \;
for device in "${devices[@]}"
do
echo "Shutting down $device"
xcrun simctl shutdown "$device"
done