Skip to content

Add Kotlin Multiplatform shared module and iOS shell CI - #15

Open
gaborbiro wants to merge 5 commits into
masterfrom
cursor/kmp-ios-bootstrap-8e2f
Open

Add Kotlin Multiplatform shared module and iOS shell CI#15
gaborbiro wants to merge 5 commits into
masterfrom
cursor/kmp-ios-bootstrap-8e2f

Conversation

@gaborbiro

@gaborbiro gaborbiro commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

Bootstraps Kotlin Multiplatform + minimal SwiftUI shell + macOS CI smoke build.

Fixes applied during review

  • shared/sharedIos.gradle: Groovy applied script (Kotlin DSL applied scripts could not configure KMP/CocoaPods).
  • Xcode: Removed AppIcon / AccentColor compiler keys pointing at missing asset sets (CompileAssetCatalogVariant).
  • iosSimulatorX64(): GitHub macos-latest often uses Intel + x86_64 iOS Simulator; only iosSimulatorArm64 produced undefined symbol _OBJC_CLASS_$_SharedSharedApi for x86_64. Adding the iosSimulatorX64 Kotlin/Native target fixes linker failures on those runners. (Running ./gradlew :shared:build before podInstall does not add CPU architectures.)

Verification

  • Linux: ./gradlew :shared:compileAndroidMain, assembleDebug, tests/lint as usual.

TestFlight

Not included; CI builds Simulator only.

Open in Web Open in Cursor 

Introduce :shared KMP library with Android (AGP kotlin multiplatform library plugin)
and macOS-only CocoaPods/iOS targets via sharedIos.gradle.kts so Linux CI unchanged.

Add minimal SwiftUI iosApp wired to Shared framework from Podfile; GitHub Actions
workflow on macOS runs podInstall and simulator xcodebuild smoke build.

Wire app module to :shared for future shared logic; document in AGENTS.md.

Co-authored-by: Gabor Biro <bgaborchen+github@gmail.com>
@gaborbiro
gaborbiro marked this pull request as ready for review April 29, 2026 12:07
cursoragent and others added 4 commits April 29, 2026 12:12
Applied Kotlin DSL scripts compile in isolation and lack kotlin {} KMP/cocoapods
extensions (scripts plugin classpath issue). Replace sharedIos.gradle.kts with
sharedIos.gradle that applies cocoapods plugin and configures the project's
kotlin extension.

Document filename in AGENTS.md.

Co-authored-by: Gabor Biro <bgaborchen+github@gmail.com>
Target Debug/Release referenced AppIcon and AccentColor asset sets that were
never added under Assets.xcassets; actool failed during CompileAssetCatalogVariant.

Remove ASSETCATALOG_COMPILER_* settings until real icons/colors are checked in.

Co-authored-by: Gabor Biro <bgaborchen+github@gmail.com>
Linker failed with undefined SharedSharedApi for x86_64 because only
iosSimulatorArm64 was declared; GitHub-hosted runners often build simulators
for Intel (x86_64). Include Kotlin/Native iosSimulatorX64 alongside arm64.

Co-authored-by: Gabor Biro <bgaborchen+github@gmail.com>
Kotlin Gradle DSL exposes iosX64() for x86_64 iOS Simulator; iosSimulatorX64
does not exist and fails configuration on CI.

Co-authored-by: Gabor Biro <bgaborchen+github@gmail.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