Skip to content

Commit 0154c67

Browse files
Build iOS with the 27.1 SDK for full-screen iPhone Duo, version 1.0.2
GitHub runners only ship Xcode 26.6, so the release job skips the App Store upload until the 27.1 SDK is available and scripts/upload-ios.sh uploads from a Mac with Xcode 27.1.
1 parent aa34b56 commit 0154c67

4 files changed

Lines changed: 70 additions & 3 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ jobs:
102102
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then v="${GITHUB_REF#refs/tags/v}"; else v="$(grep -m1 'MARKETING_VERSION' project.yml | awk '{print $2}')"; fi
103103
echo "version=$v" >> "$GITHUB_OUTPUT"
104104
echo "build=$((GITHUB_RUN_NUMBER + 100))" >> "$GITHUB_OUTPUT"
105+
sdk=$(xcrun --sdk iphoneos --show-sdk-version)
106+
if [ "$(printf '%s\n27.1\n' "$sdk" | sort -V | head -1)" = "27.1" ]; then echo "upload=true" >> "$GITHUB_OUTPUT"; else
107+
echo "::warning::iOS SDK $sdk lacks full-screen iPhone Duo support (needs 27.1). Skipping the App Store upload; run scripts/upload-ios.sh on a Mac with Xcode 27.1."
108+
fi
105109
106110
- name: Import distribution certificate and profile
107111
env:
@@ -149,6 +153,7 @@ jobs:
149153
path: build/ios/*.ipa
150154

151155
- name: Upload to App Store Connect
156+
if: steps.version.outputs.upload == 'true'
152157
run: |
153158
xcrun altool --upload-app -f build/ios/Spanscreen.ipa -t ios \
154159
--apiKey "${{ secrets.ASC_KEY_ID }}" --apiIssuer "${{ secrets.ASC_ISSUER_ID }}"

‎Spanscreen.xcodeproj/project.pbxproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@
504504
GCC_WARN_UNUSED_VARIABLE = YES;
505505
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
506506
MACOSX_DEPLOYMENT_TARGET = 14.0;
507-
MARKETING_VERSION = 1.0.1;
507+
MARKETING_VERSION = 1.0.2;
508508
MTL_ENABLE_DEBUG_INFO = NO;
509509
MTL_FAST_MATH = YES;
510510
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -632,7 +632,7 @@
632632
GCC_WARN_UNUSED_VARIABLE = YES;
633633
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
634634
MACOSX_DEPLOYMENT_TARGET = 14.0;
635-
MARKETING_VERSION = 1.0.1;
635+
MARKETING_VERSION = 1.0.2;
636636
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
637637
MTL_FAST_MATH = YES;
638638
ONLY_ACTIVE_ARCH = YES;

‎project.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ options:
1010
settings:
1111
base:
1212
DEVELOPMENT_TEAM: STSYBH724K
13-
MARKETING_VERSION: 1.0.1
13+
MARKETING_VERSION: 1.0.2
1414
CURRENT_PROJECT_VERSION: 1
1515
SWIFT_VERSION: "5.0"
1616
ENABLE_USER_SCRIPT_SANDBOXING: YES

‎scripts/upload-ios.sh‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
# Archives the iOS app with the local Xcode and uploads it to App Store Connect.
3+
# Used while the GitHub runners lack the iOS 27.1 SDK, which iPhone Duo needs for full-screen apps.
4+
# usage: ASC_KEY_ID=... ASC_ISSUER_ID=... scripts/upload-ios.sh <build-number> [version]
5+
set -euo pipefail
6+
cd "$(dirname "$0")/.."
7+
8+
build="${1:?usage: scripts/upload-ios.sh <build-number> [version]}"
9+
version="${2:-$(grep -m1 'MARKETING_VERSION' project.yml | awk '{print $2}')}"
10+
certs="${SPANSCREEN_CERTS:-$HOME/.apple-certs/spanscreen}"
11+
: "${ASC_KEY_ID:?}" "${ASC_ISSUER_ID:?}"
12+
13+
sdk=$(xcrun --sdk iphoneos --show-sdk-version)
14+
if [ "$(printf '%s\n27.1\n' "$sdk" | sort -V | head -1)" != "27.1" ]; then
15+
echo "iOS SDK $sdk is older than 27.1" >&2
16+
exit 1
17+
fi
18+
19+
tmp=$(mktemp -d)
20+
keychain="$tmp/signing.keychain-db"
21+
password=$(uuidgen)
22+
original=$(security list-keychains -d user | tr -d '"')
23+
cleanup() {
24+
security list-keychains -d user -s $original
25+
security delete-keychain "$keychain" 2>/dev/null || true
26+
rm -rf "$tmp"
27+
}
28+
trap cleanup EXIT
29+
30+
security create-keychain -p "$password" "$keychain"
31+
security set-keychain-settings -lut 3600 "$keychain"
32+
security list-keychains -d user -s "$keychain" $original
33+
security unlock-keychain -p "$password" "$keychain"
34+
security import "$certs/dist.p12" -P "$(cat "$certs/p12.pass")" -A -f pkcs12 -k "$keychain" >/dev/null
35+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$password" "$keychain" >/dev/null
36+
identity=$(security find-identity -v -p codesigning "$keychain" | awk 'NR==1 {print $2}')
37+
38+
profile="$certs/appstore.mobileprovision"
39+
uuid=$(security cms -D -i "$profile" | plutil -extract UUID raw -)
40+
team=$(security cms -D -i "$profile" | plutil -extract TeamIdentifier.0 raw -)
41+
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
42+
cp "$profile" "$HOME/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
43+
44+
echo "Archiving Spanscreen $version ($build) with iOS SDK $sdk"
45+
xcodebuild archive -quiet \
46+
-project Spanscreen.xcodeproj \
47+
-scheme SpanscreenIOS \
48+
-destination generic/platform=iOS \
49+
-archivePath "$tmp/Spanscreen-ios.xcarchive" \
50+
MARKETING_VERSION="$version" \
51+
CURRENT_PROJECT_VERSION="$build" \
52+
CODE_SIGN_STYLE=Manual \
53+
CODE_SIGN_IDENTITY="$identity" \
54+
PROVISIONING_PROFILE_SPECIFIER="$uuid" \
55+
DEVELOPMENT_TEAM="$team" \
56+
OTHER_CODE_SIGN_FLAGS="--keychain $keychain"
57+
58+
sed -e "s/__TEAM__/$team/" -e "s/__PROFILE__/$uuid/" scripts/ExportOptions-ios.plist > "$tmp/ExportOptions.plist"
59+
plutil -replace signingCertificate -string "$identity" "$tmp/ExportOptions.plist"
60+
xcodebuild -exportArchive -quiet -archivePath "$tmp/Spanscreen-ios.xcarchive" -exportPath "$tmp/ios" -exportOptionsPlist "$tmp/ExportOptions.plist"
61+
62+
xcrun altool --upload-app -f "$tmp/ios/Spanscreen.ipa" -t ios --apiKey "$ASC_KEY_ID" --apiIssuer "$ASC_ISSUER_ID"

0 commit comments

Comments
 (0)