Repository Public
1#!/usr/bin/env bash2# =============================================================================3# SP BOUCHER | INFRASTRUCTURE & AUTOMATION4# ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project : Vrai-Prix iOS8# File : Scripts/v3shot.sh9# Description : une capture de l'app contre l'API v3 de développement10# (tunnel local), niveau v3 imposé. usage : v3shot.sh <nom>11# <attente en s> [arguments de lancement…] (MODE=sombre,12# VRAIPRIX_SIM=…, BASE=…)13# Module : Scripts14# Repository : https://git.spboucher.ai/vrai-prix-ios-v315# Project Website : https://www.vrai-prix.com16# Created : 2026-11-2817# Last Modified : 2026-11-2818#19# Author : Simon-Pierre Boucher20# Position : Professor of Finance21# Institution : Université du Québec en Outaouais (UQO)22# Organization : SP Boucher23# Website : https://spboucher.ai24# Git : https://git.spboucher.ai25#26# Preferred Contact: support@spboucher.ai27# Technical Contact: dev@spboucher.ai28# Security/Admin : admin@spboucher.ai29#30# Copyright (c) 202631# Simon-Pierre Boucher32# All rights reserved where applicable. This file is governed by the33# applicable project license, copyright notices and relevant law.34# Existing third-party rights and notices remain unaffected.35#36# License : None specified (no license file in this repository)37#38# Do not embed credentials, private keys, access tokens,39# certificates or confidential personal information.40#41# =============================================================================42# END OF SP BOUCHER SOURCE HEADER43# =============================================================================4445set -uo pipefail46cd "$(dirname "$0")/.."47SIM="${VRAIPRIX_SIM:-VraiPrix-v3}"48U="$(xcrun simctl list devices | grep -F "$SIM (" | head -1 | sed -E 's/.*\(([0-9A-F-]{36})\).*/\1/')"49xcrun simctl boot "$U" 2>/dev/null; xcrun simctl bootstatus "$U" >/dev/null 2>&150APP="$([ "${MODE:-clair}" = clair ] && echo light || echo dark)"51xcrun simctl ui "$U" appearance "$APP"52name="$1"; wait="$2"; shift 253BASEARGS=(-VPLevel v3 -VPBaseURL "${BASE:-http://127.0.0.1:18545}")54[ "${BASE:-}" = prod ] && BASEARGS=()55VRAIPRIX_SIM="$SIM" Scripts/build.sh run "${BASEARGS[@]}" -VPInMemory YES "$@" >/dev/null 2>&156sleep "$wait"57mkdir -p build/shots58xcrun simctl io "$U" screenshot "build/shots/$name.png" >/dev/null 2>&1 && echo "build/shots/$name.png"59