Skip to content

fix(release): strip semver prerelease suffix from CFBundleShortVersionString - #862

Merged
jkmassel merged 1 commit into
trunkfrom
jkmassel/cfbundleshortversionstring-90060-error
Oct 30, 2026
Merged

jkmassel merged 1 commit into
trunkfrom
jkmassel/cfbundleshortversionstring-90060-error

Conversation

@jkmassel

Copy link
Copy Markdown
Contributor

Description

Fixes WordPress-iOS and Jetpack TestFlight uploads, which fail for any GutenbergKit prerelease. App Store Connect rejects GutenbergKitResources.framework with error 90060 because CFBundleShortVersionString is 0.20.0-alpha.1.

Failing build: https://buildkite.com/automattic/wordpress-ios/builds/35667

Root cause: #582 stripped the prerelease suffix from CFBundleVersion only. It kept the full version in CFBundleShortVersionString on the belief that Apple accepts it there. Apple does not. The build #582 was fixing, 33627, reported 90060 alongside 90058. It went unnoticed because WordPress-iOS then moved to the stable 0.19.0, and 0.20.0-alpha.1 is the first prerelease it has used since.

Changes:

  • Stamp the major.minor.patch core into CFBundleShortVersionString as well, so both keys read 0.20.0.
  • Make verify_framework_plist check Apple's format for both keys, so a bad value fails this repo's build rather than a consumer's upload.

The shipped framework no longer shows which prerelease it came from. Nothing reads that value: artifacts are identified by git SHA and resolved by CDN URL plus SwiftPM checksum.

This fix only reaches new builds. The 0.20.0-alpha.1 artifact on the CDN can't change, so WordPress-iOS needs a new GutenbergKit release, then a version bump.

Testing instructions

  • ./build_xcframework.sh at 0.20.0-alpha.1 exits 0, and both slices (ios-arm64, ios-arm64_x86_64-simulator) stamp 0.20.0 for both keys.
  • verify_framework_plist accepts that plist.
  • verify_framework_plist fails on CFBundleShortVersionString set to 0.20.0-alpha.1 (does not match expected '0.20.0').
  • verify_framework_plist fails on 1.2.3.4 when it matches the expected value (must be at most three ... (altool 90060)).
  • App Store Connect accepts the upload. Not done: this needs a published release consumed by a WordPress-iOS build.

To print the stamped values:

./build_xcframework.sh
for p in build/GutenbergKitResources-*.xcframework/ios-*/GutenbergKitResources.framework/Info.plist; do
  plutil -extract CFBundleShortVersionString raw -o - "$p"; echo
  plutil -extract CFBundleVersion raw -o - "$p"; echo
done

…nString

App Store Connect rejects a prerelease in this key with error 90060, the
same way it rejects one in CFBundleVersion with 90058. #582 fixed only
CFBundleVersion, so every prerelease still fails consumers' TestFlight
uploads.

Stamp the `major.minor.patch` core into both keys and check Apple's
format for both in verify_framework_plist.
@github-actions github-actions Bot added the [Type] Bug An existing feature does not function as intended label Oct 30, 2026
@jkmassel jkmassel added [Type] Build Tooling Issues or PRs related to build tooling iOS labels Oct 30, 2026
@jkmassel jkmassel self-assigned this Oct 30, 2026
@jkmassel jkmassel added this to the 0.20.0 milestone Oct 30, 2026
@wpmobilebot

Copy link
Copy Markdown

XCFramework Build

This PR's XCFramework is available for testing. Add the following to your Package.swift:

.package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/862")

Built from e3833af

@jkmassel
jkmassel requested a review from dcalhoun October 30, 2026 18:01
@jkmassel
jkmassel merged commit 0a1e69c into trunk Oct 30, 2026
26 checks passed
@jkmassel
jkmassel deleted the jkmassel/cfbundleshortversionstring-90060-error branch October 30, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iOS [Type] Bug An existing feature does not function as intended [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants