Kotlin Multiplatform iOS Integration. Issue in linking shared.framework for respective architecture

350 views Asked by At

Kotlin iOS Integration: KMP is creating a separate shared.framework based on architecture (Simulator/iPhone). Both the frameworks are generated under the Debug directory. As the frameworks search path is set recursive it searches for incorrect framework and throws error and my iOS apps compiling fails. I am not able to find out which framework to link depending on selected platform Device/Simulator. Just wanted to know if there is any possible way to handle this issue of multiple frameworks so I can switch between Simulator or Device and the Xcode matches and applies the correct shared.framework

Directory structure

Framework Search Paths

1

There are 1 answers

0
Suraj Mirajkar On

I needed to add /$(CONFIGURATION)/$(SDK_NAME)and make it as non-recursive. Now even if I run app on simulator and then on actual device, Xcode maps & links correct shared.framework. This solved my issue.

enter image description here