Skip to content

Isolate plist reading and writing in the host's plist module - #474

Merged
kraenhansen merged 2 commits into
mainfrom
refactor/share-read-and-parse-plist
Oct 12, 2026
Merged

kraenhansen merged 2 commits into
mainfrom
refactor/share-read-and-parse-plist

Conversation

@kraenhansen

Copy link
Copy Markdown
Collaborator

Closes #472. bplist-parser support in readAndParsePlist already landed in 14e5119; this does the remaining part of the issue — sharing it with verify-prebuilds — and isolates plist handling so @expo/plist and bplist-parser are easier to update.

  • readAndParsePlist moves into packages/host/src/node/plist.ts and is exported from the Node.js entrypoint (not from cli/apple.ts, which would make the entrypoint load @bacons/xcode and the CLI utilities). verify-prebuilds.mts uses it instead of its own copy, and node-addon-examples drops its @expo/plist and bplist-parser devDependencies.
  • The XML write helper from prebuilds/apple.ts moves alongside it as writePlist (internal) and also backs the two Info.plist writers in cli/apple.ts. plist.ts is now the only module importing either library.
  • plist.ts is format-only; Info.plist semantics stay with the callers' zod schemas. readAndParsePlist still returns unknown — callers validate.

Test plan

  • pnpm run build, lint, prettier:check; host tests (67) and cmake-rn tests (16)
  • Built the node-addon-examples for arm64;x86_64-apple-ios-sim and ran verify: 13 prebuilds verified, reading binary plists through the shared helper
  • Ran createAppleFramework on a test dylib (flat and versioned): both write the expected XML Info.plist through writePlist
  • CI

🤖 Generated with Claude Code

kraenhansen and others added 2 commits October 12, 2026 22:34
Move readAndParsePlist into its own module and export it from the Node.js
entrypoint, so verify-prebuilds can use it instead of its own copy. Keeping
it out of cli/apple.ts avoids loading @bacons/xcode and the CLI utilities
from the package's main entrypoint.

Closes #472

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Moves the XML write helper out of prebuilds/apple.ts into plist.ts as
writePlist, and uses it for the two Info.plist writers in cli/apple.ts, so
plist.ts is the only module importing @expo/plist or bplist-parser.
readAndParsePlist's assertion now says "a plist", as it reads any plist.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@kraenhansen kraenhansen added the Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) label Oct 12, 2026
@kraenhansen kraenhansen reopened this Oct 12, 2026
@kraenhansen kraenhansen self-assigned this Oct 12, 2026
@kraenhansen
kraenhansen marked this pull request as ready for review October 12, 2026 21:45
@kraenhansen
kraenhansen merged commit 62f421b into main Oct 12, 2026
14 of 18 checks passed
@kraenhansen
kraenhansen deleted the refactor/share-read-and-parse-plist branch October 12, 2026 21:46
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.

1 participant