From 7be2ef27b94d86954ffa007b79351baf119dbd67 Mon Sep 17 00:00:00 2001 From: SilverLABS Date: Mon, 6 Apr 2026 12:47:12 +0100 Subject: [PATCH] fix(ci): add xcodegen project.yml and generate xcodeproj before archive SPM executableTarget is treated as a CLI tool by xcodebuild, producing Products/usr/local/bin instead of a .app bundle. xcodegen generates a proper application target with PRODUCT_TYPE=com.apple.product-type.application. Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 3 +++ codemagic.yaml | 6 ++++++ project.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 project.yml diff --git a/.gitignore b/.gitignore index 3542e5b..07a7b07 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,9 @@ playground.xcworkspace .build/ +# Generated by xcodegen in CI — do not commit +*.xcodeproj/ + # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However diff --git a/codemagic.yaml b/codemagic.yaml index da7d94d..76266be 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -20,9 +20,15 @@ workflows: # GITEA_TOKEN — set this in Codemagic App Settings → Environment variables (mark as secret) scripts: + - name: Generate Xcode project + script: | + brew install xcodegen + xcodegen generate --spec project.yml + - name: Build (unsigned) script: | xcodebuild archive \ + -project SilverApple.xcodeproj \ -scheme SilverApple \ -destination "generic/platform=iOS" \ -configuration Release \ diff --git a/project.yml b/project.yml new file mode 100644 index 0000000..5ed59ad --- /dev/null +++ b/project.yml @@ -0,0 +1,43 @@ +name: SilverApple +options: + bundleIdPrefix: uk.silverlabs + deploymentTarget: + iOS: "16.0" + xcodeVersion: "15" + generateEmptyDirectories: true + +targets: + SilverApple: + type: application + platform: iOS + deploymentTarget: "16.0" + sources: + - path: SilverApple + excludes: + - Info.plist + - SilverApple.entitlements + resources: + - SilverApple/Assets.xcassets + settings: + base: + PRODUCT_BUNDLE_IDENTIFIER: uk.silverlabs.silverapple + INFOPLIST_FILE: SilverApple/Info.plist + CODE_SIGN_ENTITLEMENTS: SilverApple/SilverApple.entitlements + SWIFT_VERSION: "5.9" + TARGETED_DEVICE_FAMILY: "1,2" + OTHER_LDFLAGS: + - "-framework AuthenticationServices" + - "-framework SafariServices" + - "-framework Security" + + SilverAppleTests: + type: bundle.unit-test + platform: iOS + deploymentTarget: "16.0" + sources: + - path: SilverAppleTests + dependencies: + - target: SilverApple + settings: + base: + SWIFT_VERSION: "5.9"