Skip to content

Commit eea2f3c

Browse files
authored
fix(🍏): don't name build stamps .signature (ITMS-91063) (#655)
Xcode collects *.signature files from build products into the archive, so App Store Connect validated our incremental-build stamps as XCFramework code signatures and rejected the upload. Use a .stamp extension, remove stamps left behind by previous builds, and check the iOS build products for *.signature files in CI. Same fix as wcandillon/react-native-skia#4540.
1 parent d2b1e76 commit eea2f3c

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,19 @@ jobs:
130130
-disableAutomaticPackageResolution \
131131
build | xcpretty
132132
133+
# Xcode collects *.signature files from build products into the archive,
134+
# and App Store Connect rejects any that is not an XCFramework code
135+
# signature (ITMS-91063). No build phase may leave one there.
136+
- name: Check build products for *.signature files
137+
working-directory: apps/example/ios
138+
run: |
139+
signatures=$(find build/Build/Products -name '*.signature')
140+
if [ -n "$signatures" ]; then
141+
echo "::error::Build products contain *.signature files, which App Store Connect rejects (ITMS-91063):"
142+
echo "$signatures"
143+
exit 1
144+
fi
145+
133146
# A dedicated simulator, created once on the newest iOS runtime, so this
134147
# job never shares a device with the other repositories on the machine:
135148
# `booted` is ambiguous as soon as another job has its own simulator up.

‎packages/webgpu/scripts/prepare-apple-binaries.sh‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ copy_library() {
201201
# The caller holds the assembly lock across both assembly and linker staging.
202202
assemble_module() {
203203
local root="$CONTAINERS/$MODULE" library existing=true temporary previous='' old_archs platform variant ignored deployment
204-
local signature_file="$CONTAINERS/$MODULE/.slices/$SDK.signature"
204+
local signature_file="$CONTAINERS/$MODULE/.slices/$SDK.stamp"
205205
CONTAINER_ROOT="$root"
206206
for library in "${MODULE_LIBRARIES[@]}"; do
207207
if [[ ! -f "$root/${library%.a}.xcframework/$META_IDENTIFIER/$library" || ! -f "$root/${library%.a}.xcframework/Info.plist" ]]; then existing=false; fi
@@ -217,6 +217,7 @@ assemble_module() {
217217
previous="$platform-$(printf '%s\n' "$old_archs" | LC_ALL=C sort | paste -sd _ -)${variant:+-$variant}"
218218
fi
219219
mkdir -p "$temporary/.slices"
220+
rm -f "$temporary/.slices/$SDK.signature"
220221
cp "$SOURCE_DIRECTORY/metadata.json" "$temporary/.slices/$SDK.json"
221222
for library in "${MODULE_LIBRARIES[@]}"; do
222223
local container="$temporary/${library%.a}.xcframework"
@@ -225,7 +226,7 @@ assemble_module() {
225226
copy_library "$SOURCE_DIRECTORY/$library" "$container/$META_IDENTIFIER/$library"
226227
write_xcframework_plist "$container" "$library" "$temporary/.slices"
227228
done
228-
printf '%s\n' "$SOURCE_SIGNATURE" > "$temporary/.slices/$SDK.signature"
229+
printf '%s\n' "$SOURCE_SIGNATURE" > "$temporary/.slices/$SDK.stamp"
229230
replace_directory "$temporary" "$root"
230231
note "Prepared $SDK XCFramework slices ($(printf '%s' "$META_ARCHS" | tr '\n' ' '))"
231232
}
@@ -237,10 +238,15 @@ assemble_module() {
237238
# rather than dynamic frameworks copied into the app's Frameworks directory.
238239
# Build-product stamps include SDK/version/source identity, avoiding equal-size
239240
# archives from another platform and unnecessary copies on incremental builds.
241+
# Stamps must never use the .signature extension: Xcode collects *.signature
242+
# files from build products into the archive, and App Store Connect rejects
243+
# them as invalid XCFramework code signatures (ITMS-91063).
240244
stage_module() {
241-
local library destination temporary stamp="$OUTPUT/.rnwgpu-$MODULE.signature"
245+
local library destination temporary stamp="$OUTPUT/.rnwgpu-$MODULE.stamp"
242246
local signature="$SDK:$VERSION:$SOURCE_SIGNATURE" name
243247
mkdir -p "$OUTPUT"
248+
# Archive build folders persist across runs; drop stamps from older releases.
249+
rm -f "$OUTPUT/.rnwgpu-$MODULE.signature"
244250
for library in "${MODULE_LIBRARIES[@]}"; do
245251
name="${library#lib}"
246252
destination="$OUTPUT/librnwgpu_$name"

0 commit comments

Comments
 (0)