From c9a1213cd99c36fa0277029fc48be614e9c31eee Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 3 Jul 2026 08:11:26 +0000 Subject: [PATCH] fix: auto-create Signing.local.xcconfig for xcodegen generate XcodeGen fails when project.yml references a missing config file. Add Signing.local.xcconfig.example and have generate-xcodeproj.sh copy it on first run so fresh clones can generate the project. Co-authored-by: Rocky --- Scripts/generate-xcodeproj.sh | 14 ++++++++++++++ Signing.local.xcconfig.example | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Signing.local.xcconfig.example diff --git a/Scripts/generate-xcodeproj.sh b/Scripts/generate-xcodeproj.sh index 6806720..289d9c1 100755 --- a/Scripts/generate-xcodeproj.sh +++ b/Scripts/generate-xcodeproj.sh @@ -6,5 +6,19 @@ set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT" +# XcodeGen requires configFiles listed in project.yml to exist on disk. +# Signing.local.xcconfig is gitignored so each machine keeps its own team ID. +SIGNING_LOCAL="$ROOT/Signing.local.xcconfig" +SIGNING_EXAMPLE="$ROOT/Signing.local.xcconfig.example" +if [[ ! -f "$SIGNING_LOCAL" ]]; then + if [[ ! -f "$SIGNING_EXAMPLE" ]]; then + echo "error: missing $SIGNING_EXAMPLE" >&2 + exit 1 + fi + cp "$SIGNING_EXAMPLE" "$SIGNING_LOCAL" + echo "Created $SIGNING_LOCAL from Signing.local.xcconfig.example" + echo "Edit DEVELOPMENT_TEAM there if you use a personal Apple Developer account." +fi + xcodegen generate "$ROOT/Scripts/patch-icon-composer.sh" diff --git a/Signing.local.xcconfig.example b/Signing.local.xcconfig.example new file mode 100644 index 0000000..336d4a9 --- /dev/null +++ b/Signing.local.xcconfig.example @@ -0,0 +1,10 @@ +// Signing.local.xcconfig.example +// Copy to Signing.local.xcconfig (gitignored) for local signing overrides. +// `./Scripts/generate-xcodeproj.sh` creates Signing.local.xcconfig from this +// file automatically when it is missing. +// +// Replace DEVELOPMENT_TEAM with your Apple Developer Team ID if you are not +// building with the project's default team. + +DEVELOPMENT_TEAM = X329MZU23S +CODE_SIGN_STYLE = Automatic