Skip to content

cmake-rn: make CODE_SIGNING_ALLOWED configurable for Apple builds - #430

Merged
kraenhansen merged 1 commit into
nextfrom
claude/issue-418-apple-code-signing
Aug 13, 2026
Merged

cmake-rn: make CODE_SIGNING_ALLOWED configurable for Apple builds#430
kraenhansen merged 1 commit into
nextfrom
claude/issue-418-apple-code-signing

Conversation

@kraenhansen

Copy link
Copy Markdown
Collaborator

Summary

This addresses the Apple half of #418 (the Android ANDROID_STL half is a separate PR).

packages/cmake-rn/src/platforms/apple.ts passed CODE_SIGNING_ALLOWED=NO to xcodebuild unconditionally when building free dynamic libraries. That's the right default (we produce free-standing dynamic libraries), but a consumer who needs signed binaries in the XCFramework — enterprise distribution, or a target whose downstream tooling verifies signatures — had no way to override it.

Changes

  • Added a --code-signing-allowed CLI option (and corresponding AppleOpts.codeSigningAllowed programmatic option), following the same Option + amendCommand pattern already used for --xcframework-extension and --apple-bundle-identifier.
  • Defaults to false (unchanged behavior: CODE_SIGNING_ALLOWED=NO); passing --code-signing-allowed now produces CODE_SIGNING_ALLOWED=YES, still appended after -- to the cmake --build invocation that drives xcodebuild, matching the existing mechanism.
  • Added a minor changeset for cmake-rn (backward compatible new capability; repo is in changesets pre-release mode targeting next/rc).

Validation

  • pnpm install && pnpm run build
  • pnpm --filter cmake-rn run test
  • pnpm exec eslint packages/cmake-rn/src/platforms/apple.ts
  • pnpm exec prettier --check packages/cmake-rn/src/platforms/apple.ts .changeset/*.md

No existing test in cmake-rn's suite exercises platforms/apple.ts's build() args array (it isn't set up for that kind of mocking), so no test was extended — happy to add one if there's a preferred harness for it.


🤖 Generated with Claude Code

https://claude.ai/code/session_01DaK9eAAF5G8wj6UT8VekAm


Generated by Claude Code

@kraenhansen kraenhansen added the Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) label Aug 13, 2026 — with Claude
@kraenhansen kraenhansen self-assigned this Aug 13, 2026
Add a --code-signing-allowed flag to the Apple platform of cmake-rn.
CODE_SIGNING_ALLOWED=NO remains the default (needed for the
free-standing dynamic libraries we produce), but a consumer who needs
signed binaries in the XCFramework - enterprise distribution, or a
target whose downstream tooling verifies signatures - can now opt in.

Addresses the Apple half of #418.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DaK9eAAF5G8wj6UT8VekAm
@kraenhansen
kraenhansen force-pushed the claude/issue-418-apple-code-signing branch from 4999ae4 to 23e1cde Compare August 13, 2026 10:33
@kraenhansen
kraenhansen merged commit d9ab417 into next Aug 13, 2026
16 checks passed
@kraenhansen
kraenhansen deleted the claude/issue-418-apple-code-signing branch August 13, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants