commit 89af9c0ce8e13b1df10b7bb5bd49c40757a7c9c9
parent 663b1f2fabd305ed3896c99fb1303a6032494ebd
Author: Jean Schurger <jean@schurger.org>
Date: Fri, 13 Nov 2026 13:55:25 -0500
Icon, fastlane TestFlight lanes, 0.1 (202611131353) uploaded
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K7deYGSNhtY1AmBH7DQGNs
Diffstat:
8 files changed, 215 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,3 +1,5 @@
captures/
*.xcodeproj
build/
+build_output/
+fastlane/report.xml
diff --git a/OpenMerou/Assets.xcassets/AppIcon.appiconset/Contents.json b/OpenMerou/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,4 @@
+{
+ "images" : [ { "filename" : "icon-1024.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" } ],
+ "info" : { "author" : "xcode", "version" : 1 }
+}
diff --git a/OpenMerou/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/OpenMerou/Assets.xcassets/AppIcon.appiconset/icon-1024.png
Binary files differ.
diff --git a/OpenMerou/Assets.xcassets/Contents.json b/OpenMerou/Assets.xcassets/Contents.json
@@ -0,0 +1 @@
+{ "info" : { "author" : "xcode", "version" : 1 } }
diff --git a/OpenMerou/Info.plist b/OpenMerou/Info.plist
@@ -20,6 +20,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
+ <key>ITSAppUsesNonExemptEncryption</key>
+ <false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSBluetoothAlwaysUsageDescription</key>
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
@@ -1,3 +1,7 @@
+require "tmpdir"
+
+default_platform(:ios)
+
# Compte développeur perso (équipe CM5RQKJH56), clé App Store Connect lue dans ~/.zshrc_build de chunga.
APP_ID = "org.schurger.openmerou"
@@ -9,7 +13,26 @@ def api_key
)
end
+def xcode_auth
+ [
+ "-allowProvisioningUpdates",
+ "-authenticationKeyPath", ENV["PERSO_ASC_KEY_PATH"],
+ "-authenticationKeyID", ENV["PERSO_ASC_KEY_ID"],
+ "-authenticationKeyIssuerID", ENV["PERSO_ASC_ISSUER_ID"],
+ ]
+end
+
platform :ios do
+ def asc(method, path, body = nil)
+ require "net/http"
+ uri = URI(path.start_with?("http") ? path : "https://api.appstoreconnect.apple.com#{path}")
+ klass = { get: Net::HTTP::Get, post: Net::HTTP::Post, patch: Net::HTTP::Patch }[method]
+ req = klass.new(uri, "Content-Type" => "application/json", "Authorization" => "Bearer #{Spaceship::ConnectAPI.token.text}")
+ req.body = body.to_json if body
+ res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
+ [res.code.to_i, (JSON.parse(res.body) rescue {})]
+ end
+
desc "Enregistre l'identifiant de l'app (la fiche App Store se crée à la main)"
lane :register do
api_key
@@ -20,4 +43,115 @@ platform :ios do
UI.success("#{APP_ID} enregistré")
end
end
+
+ desc "La fiche App Store Connect existe-t-elle ?"
+ lane :app_exists do
+ api_key
+ app = Spaceship::ConnectAPI::App.find(APP_ID)
+ UI.message(app ? "FICHE #{app.id} #{app.name}" : "FICHE ABSENTE")
+ end
+
+ desc "Archive signée (sans envoi) ; BUILD=n pour fixer le numéro"
+ lane :archive do
+ key = api_key
+ get_certificates(api_key: key, output_path: Dir.tmpdir)
+ sigh(app_identifier: APP_ID, api_key: key, output_path: Dir.tmpdir, force: ENV["SIGH_FORCE"] == "1")
+ profile = lane_context[SharedValues::SIGH_NAME]
+
+ build_number = ENV["BUILD"] || Time.now.strftime("%Y%m%d%H%M")
+ archive_path = File.expand_path("~/Library/Developer/Xcode/Archives/OpenMerou-#{build_number}.xcarchive")
+ output_dir = File.expand_path("../build_output")
+ FileUtils.rm_rf(output_dir)
+ export_plist = File.join(Dir.tmpdir, "OpenMerou-ExportOptions.plist")
+ File.write(export_plist, <<~PLIST)
+ <?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>signingStyle</key><string>manual</string>
+ <key>signingCertificate</key><string>Apple Distribution</string>
+ <key>provisioningProfiles</key>
+ <dict><key>#{APP_ID}</key><string>#{profile}</string></dict>
+ <key>teamID</key><string>CM5RQKJH56</string>
+ <key>uploadSymbols</key><true/>
+ </dict>
+ </plist>
+ PLIST
+
+ # rsync de Homebrew devant /usr/bin casse -exportArchive (« Copy failed »).
+ ENV["PATH"] = "/usr/bin:/bin:#{ENV["PATH"]}"
+ sh("xcodebuild", "-project", "../OpenMerou.xcodeproj", "-scheme", "OpenMerou", "-configuration", "Release",
+ "-destination", "generic/platform=iOS", "-archivePath", archive_path,
+ "CURRENT_PROJECT_VERSION=#{build_number}", *xcode_auth, "archive")
+ sh("xcodebuild", "-exportArchive", "-archivePath", archive_path, "-exportOptionsPlist", export_plist,
+ "-exportPath", output_dir, *xcode_auth)
+ lane_context[:OM_IPA] = File.join(output_dir, "OpenMerou.ipa")
+ lane_context[:OM_BUILD] = build_number
+ end
+
+ desc "Archive puis envoi sur TestFlight (la fiche App Store Connect doit exister)"
+ lane :testflight do
+ archive
+ upload_to_testflight(api_key: api_key, ipa: lane_context[:OM_IPA], skip_waiting_for_build_processing: true)
+ UI.success("Build #{lane_context[:OM_BUILD]} envoyée sur TestFlight")
+ end
+
+ desc "TestFlight : groupe interne « Interne » (toutes les builds) avec Jean, textes bêta fr/en, « À tester » de la dernière build"
+ lane :beta_setup do
+ api_key
+ app = Spaceship::ConnectAPI::App.find(APP_ID)
+ _, groups = asc(:get, "/v1/apps/#{app.id}/betaGroups")
+ group = groups["data"].find { |g| g["attributes"]["name"] == "Interne" }
+ unless group
+ # POST brut : spaceship envoie publicLinkLimitEnabled, refusé pour un groupe interne.
+ c, r = asc(:post, "/v1/betaGroups", { data: { type: "betaGroups",
+ attributes: { name: "Interne", isInternalGroup: true, hasAccessToAllBuilds: true },
+ relationships: { app: { data: { type: "apps", id: app.id } } } } })
+ UI.message("GROUPE Interne -> #{c} #{(r["errors"] || []).map { |e| e["detail"] }.join(" ; ")}")
+ group = r["data"]
+ end
+ email = ENV["PERSO_APPLE_ID"] || "jean@schurger.org"
+ _, testers = asc(:get, "/v1/betaTesters?filter[email]=#{email}&filter[apps]=#{app.id}")
+ if testers["data"].empty?
+ c, r = asc(:post, "/v1/betaTesters", { data: { type: "betaTesters", attributes: { email: email, firstName: "Jean", lastName: "Schurger" },
+ relationships: { betaGroups: { data: [{ type: "betaGroups", id: group["id"] }] } } } })
+ UI.message("TESTEUR #{email} -> #{c} #{(r["errors"] || []).map { |e| e["detail"] }.join(" ; ")}")
+ else
+ UI.message("TESTEUR #{email} déjà présent")
+ end
+ texts = {
+ "fr-CA" => ["App libre et gratuite pour boîtier de plongée compatible : boutons, pompe à vide, capteurs, caméra.",
+ "Prototype 0.1, lecture seule : fermez l'app officielle, allumez le boîtier, ouvrez Open Mérou. Vérifiez la connexion, chaque bouton, la batterie, les pressions et la température, puis la baisse de pression pendant un cycle de vide lancé depuis l'app officielle."],
+ "en-CA" => ["Free, open-source app for compatible dive housings: buttons, vacuum pump, sensors, camera.",
+ "Prototype 0.1, read-only: close the official app, turn the housing on, open Open Mérou. Check the connection, each button, battery, pressures and temperature, then the pressure drop during a vacuum cycle started from the official app."],
+ }
+ _, locs = asc(:get, "/v1/apps/#{app.id}/betaAppLocalizations")
+ texts.each do |locale, (description, _)|
+ existing = locs["data"].find { |l| l["attributes"]["locale"] == locale }
+ attrs = { description: description, feedbackEmail: email }
+ c, r = if existing
+ asc(:patch, "/v1/betaAppLocalizations/#{existing["id"]}", { data: { type: "betaAppLocalizations", id: existing["id"], attributes: attrs } })
+ else
+ asc(:post, "/v1/betaAppLocalizations", { data: { type: "betaAppLocalizations", attributes: attrs.merge(locale: locale),
+ relationships: { app: { data: { type: "apps", id: app.id } } } } })
+ end
+ UI.message("BETA #{locale} -> #{c} #{(r["errors"] || []).map { |e| e["detail"] }.join(" ; ")}")
+ end
+ _, builds = asc(:get, "/v1/builds?filter[app]=#{app.id}&sort=-uploadedDate&limit=1")
+ build = builds["data"].first
+ UI.user_error!("Aucune build encore visible") unless build
+ UI.message("BUILD #{build["attributes"]["version"]} #{build["attributes"]["processingState"]}")
+ _, blocs = asc(:get, "/v1/builds/#{build["id"]}/betaBuildLocalizations")
+ texts.each do |locale, (_, what)|
+ existing = blocs["data"].find { |l| l["attributes"]["locale"] == locale }
+ c, r = if existing
+ asc(:patch, "/v1/betaBuildLocalizations/#{existing["id"]}", { data: { type: "betaBuildLocalizations", id: existing["id"], attributes: { whatsNew: what } } })
+ else
+ asc(:post, "/v1/betaBuildLocalizations", { data: { type: "betaBuildLocalizations", attributes: { locale: locale, whatsNew: what },
+ relationships: { build: { data: { type: "builds", id: build["id"] } } } } })
+ end
+ UI.message("A TESTER #{locale} -> #{c} #{(r["errors"] || []).map { |e| e["detail"] }.join(" ; ")}")
+ end
+ end
end
diff --git a/project.yml b/project.yml
@@ -24,6 +24,7 @@ targets:
PRODUCT_NAME: OpenMerou
INFOPLIST_FILE: OpenMerou/Info.plist
TARGETED_DEVICE_FAMILY: "1"
+ ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
SUPPORTS_MACCATALYST: NO
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD: NO
OpenMerouTests:
diff --git a/tools/make-icon.swift b/tools/make-icon.swift
@@ -0,0 +1,71 @@
+// Génère l'icône 1024×1024 (sans transparence) : swift tools/make-icon.swift chemin.png
+import CoreGraphics
+import Foundation
+import ImageIO
+import UniformTypeIdentifiers
+
+let size = 1024.0
+let out = CommandLine.arguments[1]
+let ctx = CGContext(data: nil, width: Int(size), height: Int(size), bitsPerComponent: 8, bytesPerRow: 0,
+ space: CGColorSpace(name: CGColorSpace.sRGB)!,
+ bitmapInfo: CGImageAlphaInfo.noneSkipLast.rawValue)!
+
+func rgb(_ r: Double, _ g: Double, _ b: Double, _ a: Double = 1) -> CGColor {
+ CGColor(red: r / 255, green: g / 255, blue: b / 255, alpha: a)
+}
+
+// Fond : bleu profond vers turquoise (lumière venant d'en haut).
+let bg = CGGradient(colorsSpace: CGColorSpaceCreateDeviceRGB(),
+ colors: [rgb(8, 36, 84), rgb(10, 92, 140), rgb(40, 170, 190)] as CFArray,
+ locations: [0, 0.6, 1])!
+ctx.drawLinearGradient(bg, start: CGPoint(x: 0, y: 0), end: CGPoint(x: 0, y: size), options: [])
+
+// Rayons de lumière.
+ctx.setFillColor(rgb(255, 255, 255, 0.06))
+for x in [180.0, 420.0, 700.0] {
+ ctx.move(to: CGPoint(x: x, y: size)); ctx.addLine(to: CGPoint(x: x + 120, y: size))
+ ctx.addLine(to: CGPoint(x: x - 80, y: 0)); ctx.addLine(to: CGPoint(x: x - 260, y: 0)); ctx.fillPath()
+}
+
+// Mérou : corps trapu, grande bouche, nageoire caudale arrondie.
+let body = rgb(150, 96, 62), belly = rgb(214, 170, 120), dark = rgb(92, 56, 36)
+ctx.setFillColor(body)
+ctx.move(to: CGPoint(x: 250, y: 520)) // queue
+ctx.addCurve(to: CGPoint(x: 120, y: 360), control1: CGPoint(x: 190, y: 470), control2: CGPoint(x: 120, y: 420))
+ctx.addCurve(to: CGPoint(x: 120, y: 680), control1: CGPoint(x: 160, y: 520), control2: CGPoint(x: 160, y: 520))
+ctx.addCurve(to: CGPoint(x: 250, y: 520), control1: CGPoint(x: 120, y: 620), control2: CGPoint(x: 190, y: 570))
+ctx.fillPath()
+ctx.fillEllipse(in: CGRect(x: 210, y: 330, width: 640, height: 380))
+// Nageoire dorsale.
+ctx.move(to: CGPoint(x: 330, y: 680)); ctx.addCurve(to: CGPoint(x: 700, y: 690), control1: CGPoint(x: 420, y: 800), control2: CGPoint(x: 620, y: 800))
+ctx.fillPath()
+// Ventre.
+ctx.setFillColor(belly)
+ctx.fillEllipse(in: CGRect(x: 300, y: 340, width: 500, height: 150))
+// Taches.
+ctx.setFillColor(dark)
+for (x, y, r) in [(380.0, 600.0, 26.0), (470, 640, 20), (450, 540, 30), (560, 600, 24), (620, 540, 18), (340, 520, 18)] {
+ ctx.fillEllipse(in: CGRect(x: x - r, y: y - r, width: 2 * r, height: 2 * r))
+}
+// Bouche (lèvres épaisses).
+ctx.setFillColor(dark)
+ctx.fillEllipse(in: CGRect(x: 790, y: 440, width: 110, height: 70))
+ctx.setFillColor(rgb(60, 30, 20))
+ctx.fillEllipse(in: CGRect(x: 830, y: 462, width: 60, height: 26))
+// Œil.
+ctx.setFillColor(rgb(250, 240, 210))
+ctx.fillEllipse(in: CGRect(x: 690, y: 560, width: 80, height: 80))
+ctx.setFillColor(rgb(20, 20, 30))
+ctx.fillEllipse(in: CGRect(x: 718, y: 582, width: 40, height: 40))
+ctx.setFillColor(rgb(255, 255, 255))
+ctx.fillEllipse(in: CGRect(x: 738, y: 604, width: 12, height: 12))
+
+// Bulles.
+ctx.setStrokeColor(rgb(255, 255, 255, 0.85)); ctx.setLineWidth(10)
+for (x, y, r) in [(880.0, 600.0, 22.0), (920, 700, 32), (870, 820, 44)] {
+ ctx.strokeEllipse(in: CGRect(x: x - r, y: y - r, width: 2 * r, height: 2 * r))
+}
+
+let dest = CGImageDestinationCreateWithURL(URL(fileURLWithPath: out) as CFURL, UTType.png.identifier as CFString, 1, nil)!
+CGImageDestinationAddImage(dest, ctx.makeImage()!, nil)
+CGImageDestinationFinalize(dest)