Skip to content

Document multipurpose shared modules with native Swift packages - #759

Draft
Mark Turner (markst) wants to merge 1 commit into
JetBrains:masterfrom
markst:docs/multipurpose-shared-modules
Draft

Document multipurpose shared modules with native Swift packages#759
Mark Turner (markst) wants to merge 1 commit into
JetBrains:masterfrom
markst:docs/multipurpose-shared-modules

Conversation

@markst

@markst Mark Turner (markst) commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Proposing a potential topic relating to building multipurpose shared modules. Something originally demonstrated in: https://github.com/markst/streamplayer-kt/

Summary

  • Add an architectural topic on building multipurpose shared modules: a common Kotlin API with iOS implementation owned in Swift via swiftPMDependencies, consumable as both a KMP library and a standalone Swift package.
  • Place the page under Explore project structure and cross-link from SwiftPM import, expect/actual, and project configuration.
  • Cover dual Package.swift layout, team collaboration (Kotlin contract + thin bridge, Swift owns native behavior), dual-manifest alignment caveats, and community examples (streamplayer-kt, mapbox-maps-kmp, stripe-kmp).

Test plan

  • Preview the new page in Writerside / docs build and confirm TOC entry Multipurpose shared modules appears under Explore project structure
  • Verify internal links resolve (multiplatform-spm-import.md, multiplatform-expect-actual.md, multiplatform-project-configuration.md, multiplatform-spm-export.md, create-kotlin-multiplatform-library.md)
  • Confirm Alpha / Kotlin version note and dual-Package.swift warning read correctly
  • Spot-check community example links

Explain how a KMP library can keep iOS implementation in Swift via swiftPMDependencies while remaining usable as both a Gradle dependency and a standalone Package.swift.

Co-authored-by: Cursor <cursoragent@cursor.com>
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