commit 13fad6c0e057573f2acad784d8e5390f2452cdfb
parent 7bbcc9c1564698ad5d2fb62a98cea5801d8ffa46
Author: Jean Schurger <jean@schurger.org>
Date: Fri, 13 Nov 2026 14:29:45 -0500
Container iPhone app, icon, automatic signing and TestFlight archive recipe (make archive, make upload)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K7deYGcjJYQu2t1EUEKgbs
Diffstat:
12 files changed, 138 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -3,3 +3,4 @@ build/
.build/
.swiftpm/
OpenRemoraWatch/Info.plist
+OpenRemora/Info.plist
diff --git a/Makefile b/Makefile
@@ -19,3 +19,15 @@ project: sync
build-watch: project
ssh $(CHUNGA) 'cd $(REMOTE) && xcodebuild -quiet -scheme OpenRemoraWatch -destination "$(WATCH_DEST)" -derivedDataPath build CODE_SIGNING_ALLOWED=NO build'
+
+# Archive signée pour TestFlight (signature automatique, clé API perso de chunga). BUILD=n fixe le numéro.
+BUILD ?= $(shell date +%Y%m%d%H%M)
+AUTH = -allowProvisioningUpdates -authenticationKeyPath $$PERSO_ASC_KEY_PATH -authenticationKeyID $$PERSO_ASC_KEY_ID -authenticationKeyIssuerID $$PERSO_ASC_ISSUER_ID
+
+.PHONY: archive upload
+archive: project
+ ssh $(CHUNGA) 'source ~/.zshrc_build && security unlock-keychain -p "$$(cat ~/.keyring_secret)" ~/Library/Keychains/login.keychain-db && cd $(REMOTE) && rm -rf build/OpenRemora.xcarchive build/ipa && xcodebuild -quiet -scheme OpenRemora -configuration Release -destination "generic/platform=iOS" -archivePath build/OpenRemora.xcarchive CURRENT_PROJECT_VERSION=$(BUILD) $(AUTH) archive && PATH=/usr/bin:$$PATH xcodebuild -quiet -exportArchive -archivePath build/OpenRemora.xcarchive -exportOptionsPlist tools/ExportOptions.plist -exportPath build/ipa $(AUTH) && ls -la build/ipa'
+
+# Envoi sur TestFlight de l'IPA archivée (la fiche App Store Connect doit exister).
+upload:
+ ssh $(CHUNGA) 'source ~/.zshrc_build && cd $(REMOTE) && xcrun altool --upload-app -f build/ipa/OpenRemora.ipa -t ios --apiKey $$PERSO_ASC_KEY_ID --apiIssuer $$PERSO_ASC_ISSUER_ID'
diff --git a/OpenRemora/Assets.xcassets/AppIcon.appiconset/AppIcon.png b/OpenRemora/Assets.xcassets/AppIcon.appiconset/AppIcon.png
Binary files differ.
diff --git a/OpenRemora/Assets.xcassets/AppIcon.appiconset/Contents.json b/OpenRemora/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,4 @@
+{
+ "images" : [ { "filename" : "AppIcon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" } ],
+ "info" : { "author" : "xcode", "version" : 1 }
+}
diff --git a/OpenRemora/Assets.xcassets/Contents.json b/OpenRemora/Assets.xcassets/Contents.json
@@ -0,0 +1 @@
+{ "info" : { "author" : "xcode", "version" : 1 } }
diff --git a/OpenRemora/OpenRemoraApp.swift b/OpenRemora/OpenRemoraApp.swift
@@ -0,0 +1,25 @@
+import SwiftUI
+
+/// App iPhone : pour l'instant, elle sert à installer l'app de la montre.
+/// Le carnet (plongées de la montre et de Subsurface) viendra ici.
+@main
+struct OpenRemoraApp: App {
+ var body: some Scene {
+ WindowGroup {
+ NavigationStack {
+ List {
+ Section {
+ Label("L'ordinateur de plongée est sur votre Apple Watch Ultra.", systemImage: "applewatch")
+ Label("Le carnet des plongées arrivera ici.", systemImage: "book.closed")
+ }
+ Section {
+ Text("Open Rémora est un ordinateur secondaire, non certifié. Plongez toujours avec un ordinateur de plongée principal.")
+ .font(.footnote)
+ .foregroundStyle(.secondary)
+ }
+ }
+ .navigationTitle("Open Rémora")
+ }
+ }
+ }
+}
diff --git a/OpenRemoraWatch/Assets.xcassets/AppIcon.appiconset/AppIcon.png b/OpenRemoraWatch/Assets.xcassets/AppIcon.appiconset/AppIcon.png
Binary files differ.
diff --git a/OpenRemoraWatch/Assets.xcassets/AppIcon.appiconset/Contents.json b/OpenRemoraWatch/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,4 @@
+{
+ "images" : [ { "filename" : "AppIcon.png", "idiom" : "universal", "platform" : "watchos", "size" : "1024x1024" } ],
+ "info" : { "author" : "xcode", "version" : 1 }
+}
diff --git a/OpenRemoraWatch/Assets.xcassets/Contents.json b/OpenRemoraWatch/Assets.xcassets/Contents.json
@@ -0,0 +1 @@
+{ "info" : { "author" : "xcode", "version" : 1 } }
diff --git a/project.yml b/project.yml
@@ -4,6 +4,7 @@ options:
bundleIdPrefix: org.schurger
developmentLanguage: fr
deploymentTarget:
+ iOS: "17.0"
watchOS: "11.0"
packages:
RemoraDeco:
@@ -16,6 +17,28 @@ settings:
CURRENT_PROJECT_VERSION: "1"
SWIFT_VERSION: "6.0"
targets:
+ OpenRemora:
+ type: application
+ platform: iOS
+ sources:
+ - path: OpenRemora
+ dependencies:
+ - target: OpenRemoraWatch
+ settings:
+ base:
+ PRODUCT_BUNDLE_IDENTIFIER: org.schurger.openremora
+ PRODUCT_NAME: OpenRemora
+ TARGETED_DEVICE_FAMILY: "1"
+ ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
+ SUPPORTS_MACCATALYST: NO
+ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD: NO
+ info:
+ path: OpenRemora/Info.plist
+ properties:
+ CFBundleDisplayName: Open Rémora
+ ITSAppUsesNonExemptEncryption: false
+ UILaunchScreen: {}
+ UISupportedInterfaceOrientations: [UIInterfaceOrientationPortrait]
OpenRemoraWatch:
type: application
platform: watchOS
@@ -26,14 +49,16 @@ targets:
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: org.schurger.openremora.watchkitapp
- PRODUCT_NAME: OpenRemora
+ PRODUCT_NAME: OpenRemoraWatch
+ ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
+ SKIP_INSTALL: YES
info:
path: OpenRemoraWatch/Info.plist
properties:
CFBundleDisplayName: Open Rémora
WKApplication: true
- # Tant que l'app iPhone n'existe pas ; deviendra WKCompanionAppBundleIdentifier.
- WKWatchOnly: true
+ WKCompanionAppBundleIdentifier: org.schurger.openremora
+ WKRunsIndependentlyOfCompanionApp: true
WKBackgroundModes: [underwater-depth]
NSMotionUsageDescription: Open Rémora lit la profondeur et la température de l'eau pendant la plongée.
entitlements:
@@ -42,6 +67,10 @@ targets:
# 6 m : libre. 40 m (submerged-depth-and-pressure) : sur demande à Apple.
com.apple.developer.submerged-shallow-depth-and-pressure: true
schemes:
+ OpenRemora:
+ build:
+ targets:
+ OpenRemora: all
OpenRemoraWatch:
build:
targets:
diff --git a/tools/ExportOptions.plist b/tools/ExportOptions.plist
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>method</key>
+ <string>app-store-connect</string>
+ <key>destination</key>
+ <string>export</string>
+ <key>signingStyle</key>
+ <string>automatic</string>
+ <key>teamID</key>
+ <string>CM5RQKJH56</string>
+ <key>uploadSymbols</key>
+ <true/>
+</dict>
+</plist>
diff --git a/tools/icon.swift b/tools/icon.swift
@@ -0,0 +1,42 @@
+// Dessine l'icône (1024 px, opaque) : `swift tools/icon.swift sortie.png` sur chunga.
+import CoreGraphics
+import Foundation
+import ImageIO
+import UniformTypeIdentifiers
+
+let size = 1024
+let space = CGColorSpaceCreateDeviceRGB()
+let ctx = CGContext(data: nil, width: size, height: size, bitsPerComponent: 8, bytesPerRow: 0, space: space,
+ bitmapInfo: CGImageAlphaInfo.noneSkipLast.rawValue)!
+func color(_ r: Double, _ g: Double, _ b: Double, _ a: Double = 1) -> CGColor { CGColor(red: r, green: g, blue: b, alpha: a) }
+
+// Eau : clair en surface (haut), sombre au fond.
+let gradient = CGGradient(colorsSpace: space, colors: [color(0.02, 0.10, 0.25), color(0.03, 0.33, 0.60), color(0.20, 0.72, 0.90)] as CFArray,
+ locations: [0, 0.6, 1])!
+ctx.drawLinearGradient(gradient, start: CGPoint(x: 0, y: 0), end: CGPoint(x: 0, y: size), options: [])
+
+// Profil de plongée : descente, fond, remontée avec un palier.
+let pts: [(Double, Double)] = [(130, 830), (300, 330), (560, 330), (700, 640), (820, 640), (894, 830)]
+let profile = CGMutablePath()
+profile.move(to: CGPoint(x: pts[0].0, y: pts[0].1))
+for p in pts.dropFirst() { profile.addLine(to: CGPoint(x: p.0, y: p.1)) }
+let fill = profile.mutableCopy()!
+fill.closeSubpath()
+ctx.addPath(fill); ctx.setFillColor(color(1, 1, 1, 0.14)); ctx.fillPath()
+ctx.addPath(profile); ctx.setStrokeColor(color(1, 1, 1)); ctx.setLineWidth(44)
+ctx.setLineJoin(.round); ctx.setLineCap(.round); ctx.strokePath()
+
+// Le rémora : petit poisson qui suit le profil, au fond.
+ctx.setFillColor(color(1.0, 0.72, 0.20))
+ctx.fillEllipse(in: CGRect(x: 360, y: 180, width: 230, height: 96))
+let tail = CGMutablePath()
+tail.move(to: CGPoint(x: 380, y: 228)); tail.addLine(to: CGPoint(x: 290, y: 290)); tail.addLine(to: CGPoint(x: 290, y: 166))
+tail.closeSubpath()
+ctx.addPath(tail); ctx.fillPath()
+ctx.setFillColor(color(0.02, 0.10, 0.25))
+ctx.fillEllipse(in: CGRect(x: 528, y: 232, width: 24, height: 24))
+
+let url = URL(fileURLWithPath: CommandLine.arguments[1])
+let dest = CGImageDestinationCreateWithURL(url as CFURL, UTType.png.identifier as CFString, 1, nil)!
+CGImageDestinationAddImage(dest, ctx.makeImage()!, nil)
+CGImageDestinationFinalize(dest)