Skip to content

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented Jan 9, 2026

Same as #271 but branched off the v0.10.1 tag because that's what WordPress iOS is currently using.

I got #271 to what looks like a working state, but being branched off main, it brought unrelated build failures in WordPress iOS with it, see wordpress-mobile/WordPress-iOS#25119.

mokagio and others added 24 commits January 9, 2026 16:38
This setup worked in a different configuration, not sure why it doesn't
here yet.
This had been in my local setup all this time, but got lost in the many
`ios/Sources` diff lines
Otherwise, we get

error: 'gutenbergkit': invalid type for binary product 'GutenbergKit'; products referencing only binary targets must be executable or automatic library products
When GutenbergKitResources is a binary target (XCFramework), Swift fails
with "module was built from a non-package interface" because it treats
both targets as same-package but the XCFramework was built for distribution.

Setting packageAccess: false makes GutenbergKit act as an external client,
bypassing the same-package module loading restriction.

See: https://developer.apple.com/documentation/packagedescription/target/packageaccess

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The `packageAccess: false` setting required for XCFramework import is
incompatible with Swift's `package` access modifier. When packageAccess
is disabled, the compiler doesn't pass -package-name, causing `package`
declarations to be treated as fileprivate.

This is a necessary tradeoff to support XCFramework distribution.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update the build script to name the zip archive as:
GutenbergKitResources-<commit_sha>.xcframework.zip

This matches the URL format expected in Package.swift for versioned
XCFramework distribution.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Move checksum computation from Makefile into build_xcframework.sh
  to keep SHA knowledge in one place (DRY)
- Replace emoji output with green colored text
- Move color definitions to top of script

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@mokagio mokagio force-pushed the mokagio/ship-resources-as-xcframework-0.10.1 branch from 0be9cf6 to b1dd10c Compare January 11, 2026 23:46
@mokagio
Copy link
Contributor Author

mokagio commented Jan 12, 2026

Good news, the changes as of b1e5274 result in a green build in WordPress.

@mokagio mokagio force-pushed the mokagio/ship-resources-as-xcframework-0.10.1 branch from e42241e to 1cf614d Compare January 13, 2026 03:47
It fails as it is with:

Module 'GutenbergKitResources' is in package 'gutenbergkit' but was
built from a non-package interface; modules of the same package can only
be loaded if built from source or package interface.

Putting up a dedicated test harness is too much at this time, given we
are still exploring.
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.

2 participants