From b471bacf3d28d7ddcf2a05616a629c38e8cc81bb Mon Sep 17 00:00:00 2001 From: William Candillon Date: Wed, 25 Nov 2026 12:20:34 +0000 Subject: [PATCH 1/3] =?UTF-8?q?fix(=F0=9F=8D=8F):=20don't=20name=20build?= =?UTF-8?q?=20stamps=20.signature=20(ITMS-91063)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 and remove stamps left behind by previous builds. Fixes #4539 --- packages/skia/scripts/prepare-apple-binaries.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/skia/scripts/prepare-apple-binaries.sh b/packages/skia/scripts/prepare-apple-binaries.sh index a4097a8741..285a964ef3 100644 --- a/packages/skia/scripts/prepare-apple-binaries.sh +++ b/packages/skia/scripts/prepare-apple-binaries.sh @@ -212,7 +212,7 @@ copy_library() { # The caller holds the assembly lock across both assembly and linker staging. assemble_module() { local root="$CONTAINERS/$MODULE" library existing=true temporary previous='' old_archs platform variant ignored deployment - local signature_file="$CONTAINERS/$MODULE/.slices/$SDK.signature" + local signature_file="$CONTAINERS/$MODULE/.slices/$SDK.stamp" CONTAINER_ROOT="$root" for library in "${MODULE_LIBRARIES[@]}"; do if [[ ! -f "$root/${library%.a}.xcframework/$META_IDENTIFIER/$library" || ! -f "$root/${library%.a}.xcframework/Info.plist" ]]; then existing=false; fi @@ -228,6 +228,7 @@ assemble_module() { previous="$platform-$(printf '%s\n' "$old_archs" | LC_ALL=C sort | paste -sd _ -)${variant:+-$variant}" fi mkdir -p "$temporary/.slices" + rm -f "$temporary/.slices/$SDK.signature" cp "$SOURCE_DIRECTORY/metadata.json" "$temporary/.slices/$SDK.json" for library in "${MODULE_LIBRARIES[@]}"; do local container="$temporary/${library%.a}.xcframework" @@ -236,7 +237,7 @@ assemble_module() { copy_library "$SOURCE_DIRECTORY/$library" "$container/$META_IDENTIFIER/$library" write_xcframework_plist "$container" "$library" "$temporary/.slices" done - printf '%s\n' "$SOURCE_SIGNATURE" > "$temporary/.slices/$SDK.signature" + printf '%s\n' "$SOURCE_SIGNATURE" > "$temporary/.slices/$SDK.stamp" replace_directory "$temporary" "$root" note "Prepared $SDK XCFramework slices ($(printf '%s' "$META_ARCHS" | tr '\n' ' '))" } @@ -248,10 +249,15 @@ assemble_module() { # rather than dynamic frameworks copied into the app's Frameworks directory. # Build-product stamps include SDK/version/source identity, avoiding equal-size # archives from another platform and unnecessary copies on incremental builds. +# Stamps must never use the .signature extension: Xcode collects *.signature +# files from build products into the archive, and App Store Connect rejects +# them as invalid XCFramework code signatures (ITMS-91063). stage_module() { - local library destination temporary stamp="$OUTPUT/.rnskia-$MODULE.signature" + local library destination temporary stamp="$OUTPUT/.rnskia-$MODULE.stamp" local signature="$SDK:$VERSION:$SOURCE_SIGNATURE" name mkdir -p "$OUTPUT" + # Archive build folders persist across runs; drop stamps from older releases. + rm -f "$OUTPUT/.rnskia-$MODULE.signature" for library in "${MODULE_LIBRARIES[@]}"; do name="${library#lib}" destination="$OUTPUT/librnskia_$name" From b9238a6f5ff9d9105cf23debe0bdcc26dd19de7c Mon Sep 17 00:00:00 2001 From: William Candillon Date: Wed, 25 Nov 2026 12:36:31 +0000 Subject: [PATCH 2/3] =?UTF-8?q?test(=F0=9F=8D=8F):=20guard=20against=20*.s?= =?UTF-8?q?ignature=20files=20in=20Apple=20build=20products?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A unit test runs the assembly and staging steps of the Xcode phase and fails if they leave a *.signature file behind, and the iOS CI job checks the real build products after xcodebuild. --- .github/workflows/ci.yml | 12 +++ .../__tests__/prepare-apple-binaries.spec.ts | 93 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 packages/skia/scripts/__tests__/prepare-apple-binaries.spec.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4238e59ec0..d95a111dfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -597,6 +597,18 @@ jobs: exit 1 } + # Xcode collects *.signature files from build products into the archive, + # and App Store Connect rejects any that is not an XCFramework code + # signature (ITMS-91063, #4539). No build phase may leave one there. + - name: Check build products for *.signature files + run: | + signatures=$(find "$DERIVED_DATA/Build/Products" -name '*.signature') + if [ -n "$signatures" ]; then + echo "::error::Build products contain *.signature files, which App Store Connect rejects (ITMS-91063):" + echo "$signatures" + exit 1 + fi + # React Native's prebuilt core, which the example installs since 0.88, is # compiled with Metro on 8081: an RCT_METRO_PORT build setting no longer # reaches it. diff --git a/packages/skia/scripts/__tests__/prepare-apple-binaries.spec.ts b/packages/skia/scripts/__tests__/prepare-apple-binaries.spec.ts new file mode 100644 index 0000000000..cf01b88a10 --- /dev/null +++ b/packages/skia/scripts/__tests__/prepare-apple-binaries.spec.ts @@ -0,0 +1,93 @@ +import { execFileSync } from "child_process"; +import fs from "fs"; +import os from "os"; +import path from "path"; + +const script = path.join(__dirname, "..", "prepare-apple-binaries.sh"); + +// Every file below `directory`, relative to it. +const walk = (directory: string): string[] => + fs.readdirSync(directory, { withFileTypes: true }).flatMap((entry) => { + const file = path.join(directory, entry.name); + return entry.isDirectory() + ? walk(file).map((child) => path.join(entry.name, child)) + : [entry.name]; + }); + +// Runs the assembly and linker staging steps of the Xcode phase against a +// local archive. The macOS-only ditto and plutil are stubbed so the test also +// runs on Linux. +const prepare = (root: string) => + execFileSync( + "/bin/bash", + [ + "-c", + `set -Eeuo pipefail +source "$1" +ditto() { mkdir -p "$2"; cp -R "$1"/. "$2"; } +json_strings() { echo arm64; } +WORK_DIR="$2/work"; mkdir -p "$WORK_DIR"; TEMP_PATHS=() +SDK=iphoneos VERSION=0.0.0 SOURCE_SIGNATURE=source MODULE=skia +MODULE_LIBRARIES=(libskia.a) META_IDENTIFIER=ios-arm64 META_ARCHS=arm64 +SOURCE_DIRECTORY="$2/source" CONTAINERS="$2/assembly" OUTPUT="$2/output" +assemble_module +CONTAINER_ROOT="$CONTAINERS/$MODULE" +stage_module`, + "prepare", + script, + root, + ], + { stdio: "pipe" } + ); + +// Xcode collects *.signature files from build products into the archive, and +// App Store Connect rejects any that is not an XCFramework code signature +// (ITMS-91063, #4539). Build bookkeeping must never use that extension. +describe("prepare-apple-binaries.sh", () => { + let root: string; + + beforeEach(() => { + root = fs.mkdtempSync(path.join(os.tmpdir(), "rnskia-prepare-")); + fs.mkdirSync(path.join(root, "source")); + fs.writeFileSync(path.join(root, "source", "libskia.a"), "archive"); + fs.writeFileSync( + path.join(root, "source", "metadata.json"), + '{"architectures":["arm64"]}' + ); + }); + + afterEach(() => fs.rmSync(root, { recursive: true, force: true })); + + const signatures = () => + ["output", "assembly"].flatMap((directory) => + walk(path.join(root, directory)) + .filter((file) => file.endsWith(".signature")) + .map((file) => path.join(directory, file)) + ); + + it("stages the library without writing *.signature files", () => { + prepare(root); + expect( + fs.readFileSync(path.join(root, "output", "librnskia_skia.a"), "utf8") + ).toBe("archive"); + expect(signatures()).toEqual([]); + // An incremental build reuses the stamps and still writes none. + prepare(root); + expect(signatures()).toEqual([]); + }); + + it("removes the *.signature stamps of earlier releases", () => { + // Archive build folders persist, so 3.12 stamps would still be uploaded. + fs.mkdirSync(path.join(root, "output")); + fs.writeFileSync(path.join(root, "output", ".rnskia-skia.signature"), ""); + fs.mkdirSync(path.join(root, "assembly", "skia", ".slices"), { + recursive: true, + }); + fs.writeFileSync( + path.join(root, "assembly", "skia", ".slices", "iphoneos.signature"), + "" + ); + prepare(root); + expect(signatures()).toEqual([]); + }); +}); From 0377dd72280903ad7ba3ccf15b54ef2ddda7a6ff Mon Sep 17 00:00:00 2001 From: William Candillon Date: Wed, 25 Nov 2026 12:52:03 +0000 Subject: [PATCH 3/3] =?UTF-8?q?ci(=F0=9F=8D=8F):=20skip=20react-native-web?= =?UTF-8?q?gpu's=20stamp=20until=20it=20ships=20the=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The example installs a react-native-webgpu release that still writes .rnwgpu-dawn.signature; wcandillon/react-native-webgpu#655 fixes it. --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d95a111dfe..24171895c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -600,9 +600,13 @@ jobs: # Xcode collects *.signature files from build products into the archive, # and App Store Connect rejects any that is not an XCFramework code # signature (ITMS-91063, #4539). No build phase may leave one there. + # The react-native-webgpu release the example installs still writes + # .rnwgpu-dawn.signature (fixed in wcandillon/react-native-webgpu#655): + # drop the exclusion once the example is on a release with that fix. - name: Check build products for *.signature files run: | - signatures=$(find "$DERIVED_DATA/Build/Products" -name '*.signature') + signatures=$(find "$DERIVED_DATA/Build/Products" -name '*.signature' \ + -not -path '*/ReactNativeWebGPUBinaries/*') if [ -n "$signatures" ]; then echo "::error::Build products contain *.signature files, which App Store Connect rejects (ITMS-91063):" echo "$signatures"