• Subject: KMP iOS Linker Error: Undefined symbols for StoreKit in nested module structure
I am facing a linker issue in my Kotlin Multiplatform project specifically targeting iOS (iosArm64).
I have a multi-module setup:
:adapty module: Wraps the Adapty KMP SDK using Cocoapods. This module builds successfully on its own.
:data module: Depends on the :adapty module (implementation(project(":adapty"))).
The Issue: When I try to build or run the :data module (specifically the linkPodDebugFrameworkIosArm64 task), the build fails with Undefined symbols related to StoreKit and SwiftUICore warnings. It seems the transitive dependencies (native frameworks) are not being linked correctly when the module is nested.
• Error Log:
ld: warning: Could not parse or use implicit file ... SwiftUICore.tbd: cannot link directly with 'SwiftUICore'
Undefined symbols for architecture arm64:
"StoreKit.Transaction.Offer.period.getter : StoreKit.Product.SubscriptionPeriod?", referenced from: Adapty.o
"StoreKit.Product.purchase...", referenced from: Adapty.o
ld: symbol(s) not found for architecture arm64
Is there a specific linkerOpts configuration or Cocoapods setup required to expose StoreKit symbols to the consumer module in this KMP structure?