Initial social.io Swift app
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/zsh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
script_dir="$(cd -- "$(dirname "$0")" && pwd)"
|
||||
device="${1:-booted}"
|
||||
output_dir="${2:-/tmp/socialio-controlled-shots}"
|
||||
control_file="${SOCIALIO_CONTROL_FILE:-/tmp/socialio-control.txt}"
|
||||
routes_file="${SOCIALIO_SCREENSHOT_ROUTES:-$script_dir/ui-screenshot-routes.txt}"
|
||||
bundle_id="io.social.app"
|
||||
|
||||
mkdir -p "$output_dir"
|
||||
|
||||
printf '%s\n' 'socialio://mailbox/inbox' > "$control_file"
|
||||
|
||||
SIMCTL_CHILD_SOCIALIO_CONTROL_FILE="$control_file" \
|
||||
SIMCTL_CHILD_SOCIALIO_CONTROL_POLL_MS="250" \
|
||||
xcrun simctl launch --terminate-running-process "$device" "$bundle_id" >/dev/null
|
||||
|
||||
sleep 2
|
||||
|
||||
while IFS='|' read -r name route; do
|
||||
if [[ -z "${name}" || "${name}" == \#* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
printf '%s\n' "$route" > "$control_file"
|
||||
sleep 1.2
|
||||
xcrun simctl io "$device" screenshot "$output_dir/$name.png" >/dev/null
|
||||
done < "$routes_file"
|
||||
|
||||
echo "Saved screenshots to $output_dir"
|
||||
@@ -0,0 +1,6 @@
|
||||
# name|route
|
||||
inbox|socialio://mailbox/inbox
|
||||
starred|socialio://mailbox/starred?unreadOnly=true
|
||||
launch-copy|socialio://open?thread=launch-copy&message=launch-copy-2
|
||||
investor-update|socialio://open?thread=investor-update&message=investor-update-1
|
||||
compose-grandma|socialio://compose?to=grandma@example.com&subject=Family%20Photos&body=Hi%20Grandma%2C%0A%0AI%20pulled%20up%20the%20photos%20thread%20for%20you.
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/zsh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
script_dir="$(cd -- "$(dirname "$0")" && pwd)"
|
||||
device="${1:-8EBCDD58-34AB-457A-A878-8004A6108CA9}"
|
||||
output_dir="${2:-/tmp/socialio-ui-review}"
|
||||
derived_data="${3:-/tmp/socialio-ui-review-derived}"
|
||||
project="/Users/philkunz/gitea/social.io-swiftapp/SocialIO/SocialIO.xcodeproj"
|
||||
app_path="$derived_data/Build/Products/Debug-iphonesimulator/SocialIO.app"
|
||||
|
||||
xcodebuild \
|
||||
-project "$project" \
|
||||
-scheme SocialIO \
|
||||
-configuration Debug \
|
||||
-destination "id=$device" \
|
||||
-derivedDataPath "$derived_data" \
|
||||
build
|
||||
|
||||
xcrun simctl install "$device" "$app_path"
|
||||
"$script_dir/capture-controlled-screenshots.sh" "$device" "$output_dir"
|
||||
|
||||
echo "Built app at $app_path"
|
||||
echo "Saved screenshots to $output_dir"
|
||||
Reference in New Issue
Block a user