Hello everyone. I have a KMM app, the iOS project ...
# multiplatform
k
Hello everyone. I have a KMM app, the iOS project is able to consume functionalities from the shared module. Now I’m trying to add Swift Package into my iOS project. Can I make my swift package also recognize the shared module ?
h
One option: create a XCFramework and include it in your SPM, either local or via remote artifacts. Local example: https://github.com/hfhbd/testing-coroutines/blob/main/build.gradle.kts with https://github.com/hfhbd/testing-coroutines/blob/main/ios/Package.swift Or use some gradle plugins, eg: https://github.com/ge-org/multiplatform-swiftpackage
k
I will take a look on this, thank you very much @hfhbd
Hi @hfhbd, do you know if the swift-package gradle plugin work with with M1 arch ? I get this error when try to run the iOS app
Copy code
ld: symbol(s) not found for architecture arm64
h
Nope, I don't know, I don't use this plugin
k
OK, thanks 🙏
a
If we talking about https://github.com/ge-org/multiplatform-swiftpackage it currently doesnt support M1 simulator, see https://github.com/ge-org/multiplatform-swiftpackage/issues/31 but since kotlin added XCFramework output support it really isnt necessary to use any more
h
Right, a simple Gradle task to generate the SPM works
k
Yep got it working with your sample above. Thanks again 🙏