From f4d41ef254125f97bfbca42a08d0f01ef84ab3fa Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 26 Dec 2025 18:19:48 +0100 Subject: [PATCH] chore(ios): auto team id fallback --- apps/ios/fastlane/Fastfile | 8 ++++++++ apps/ios/fastlane/SETUP.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/ios/fastlane/Fastfile b/apps/ios/fastlane/Fastfile index a727692d0..2221dd704 100644 --- a/apps/ios/fastlane/Fastfile +++ b/apps/ios/fastlane/Fastfile @@ -1,3 +1,5 @@ +require "shellwords" + default_platform(:ios) def load_env_file(path) @@ -61,6 +63,12 @@ platform :ios do api_key = asc_api_key team_id = ENV["IOS_DEVELOPMENT_TEAM"] + if team_id.nil? || team_id.strip.empty? + helper_path = File.expand_path("../../scripts/ios-team-id.sh", __dir__) + if File.exist?(helper_path) + team_id = sh("bash #{helper_path.shellescape}").strip + end + end UI.user_error!("Missing IOS_DEVELOPMENT_TEAM (Apple Team ID). Add it to fastlane/.env or export it in your shell.") if team_id.nil? || team_id.strip.empty? build_app( diff --git a/apps/ios/fastlane/SETUP.md b/apps/ios/fastlane/SETUP.md index ef01db1f6..05331d73d 100644 --- a/apps/ios/fastlane/SETUP.md +++ b/apps/ios/fastlane/SETUP.md @@ -22,7 +22,7 @@ ASC_KEY_PATH=/absolute/path/to/AuthKey_XXXXXXXXXX.p8 IOS_DEVELOPMENT_TEAM=YOUR_TEAM_ID ``` -Tip: run `scripts/ios-team-id.sh` from the repo root to print a Team ID to paste into `.env`. +Tip: run `scripts/ios-team-id.sh` from the repo root to print a Team ID to paste into `.env`. Fastlane falls back to this helper if `IOS_DEVELOPMENT_TEAM` is missing. Run: