Repository navigation
Add manual for Swift sources in native extensions - #697
Open
ekharkunov wants to merge 9 commits into
Open
ekharkunov wants to merge 9 commits into
ekharkunov wants to merge 9 commits into
Conversation
Describes how to put .swift files into the src folder of an extension for iOS and macOS, call them from Objective-C++ through the generated -Swift.h header, use a bridging header and Swift packages from Swift, and set the swiftFlags of the ext.manifest.
This was referenced Nov 4, 2026
The paths are set with additionalSwiftIncludePaths and additionalFrameworkSearchPaths in the extension manifest instead of -I and -F in swiftFlags.
…platforms The minimum version can be raised by a package, the module name must differ from the imported modules, an extension with only .mm and .swift files doesn't build for other platforms, and the library artifact has no Swift. Also list both errors for swiftFlags values and separate the troubleshooting entries.
ekharkunov
marked this pull request as ready for review
November 5, 2026 10:45
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d8af48a5d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a manual that describes how to write the code of a native extension in Swift for iOS and macOS: where to put the
.swiftfiles, how to call them from Objective-C++ through the generated<Module>-Swift.hheader, how to use a bridging header and Swift packages from Swift, and how to set compiler options withswiftFlags,additionalSwiftIncludePathsandadditionalFrameworkSearchPaths.It also explains that the Swift runtime libraries that an older minimum iOS or macOS version lacks are added to the application automatically.
Technical changes
docs/en/manuals/extensions-swift.md, listed inen.jsonafter the Swift Package Manager manual.extensions.mdmentions Swift files in the description of thesrcfolder, andextensions-ext-manifests.mdlists the newswiftFlags,additionalSwiftIncludePathsandadditionalFrameworkSearchPathskeys.minVersioninSwiftPackages.jsonraises the minimum version.