Skip to content

fix(scanner): stamp opencv2 with a released SDK - #635

Merged
bmc08gt merged 1 commit into
mainfrom
fix/opencv-sdk-stamp
Aug 24, 2026
Merged

fix(scanner): stamp opencv2 with a released SDK#635
bmc08gt merged 1 commit into
mainfrom
fix/opencv-sdk-stamp

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

The OpenCV 4.12.0 rebuild in #630 was made on a machine whose only Xcode is a
27.0 beta, so both slices of the committed opencv2.xcframework carry
LC_BUILD_VERSION sdk 27.0. The App Store rejects any binary stamped above the
newest released SDK:

ITMS-90512: Invalid sdk value — the value provided for the sdk portion of
LC_BUILD_VERSION in Flipcash.app/Frameworks/opencv2.framework/opencv2 is 27.0
which is greater than the maximum allowed value of 26.5.

That took out 2026.8.3 build 500 (INVALID_BINARY), and because the framework
lives on main it would take out every subsequent release too.

What this does

  • Restamps both slices to sdk 26.1 with vtool — the same sdk the shipping
    2026.8.2 framework carried. Only the LC_BUILD_VERSION load command changes;
    architectures are preserved (arm64 / x86_64+arm64) and the frameworks are
    unsigned, so nothing needed re-signing.
  • Adds a check_sdk_version guard to CodeScanner/Scripts/build_opencv.sh
    that refuses to build under an SDK above MAX_ALLOWED_SDK (26.5). The
    script's output is committed and shipped as-is, so a beta Xcode at build time
    otherwise only surfaces as a failed submission weeks later.

Raise MAX_ALLOWED_SDK when Apple starts accepting a newer one.

Follow-up

The patch corrects the stamp, not the toolchain the code was compiled with.
Once a release Xcode 26.x is installed the framework should be rebuilt from
source against it; tracked separately.

The 4.12.0 rebuild in #630 was made with the only Xcode on the build
machine, a 27.0 beta, so both framework slices carry LC_BUILD_VERSION
sdk 27.0. The App Store rejects any binary stamped above the newest
released SDK (ITMS-90512), which took out 2026.8.3 build 500 — and
would take out every release until fixed, since this sits on main.

Restamp both slices to 26.1, the sdk the shipping 2026.8.2 framework
carried, with vtool. Nothing else in the binary changes and the
frameworks are unsigned, so there is nothing to re-sign.

Also refuse to build the framework at all under a too-new SDK. This
script's output is committed and shipped as-is, so a beta Xcode here
surfaces as a failed submission weeks later, long after whoever ran it
has moved on.
@bmc08gt
bmc08gt merged commit 2d828aa into main Aug 24, 2026
@bmc08gt
bmc08gt deleted the fix/opencv-sdk-stamp branch August 27, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant