Has anyone tried the (apparently newly introduced ...
# multiplatform
m
Has anyone tried the (apparently newly introduced in Kotlin 2.0) local spm embedding of kmp packages? https://kotlinlang.org/docs/multiplatform-spm-local-integration.html The tutorial didn't work for me unfortunately and I was wondering if it's me or the tutorial, because it seems to be missing some important information
p
I do recall it worked for me. What problem are you having?
m
The shared module is unresolved in the local package. What's weird is that there's no mention of its Package.swift. I'm not sure how it's supposed to be properly embedded, why the embedding is in the pre action of app and not the spm package, why the import is Shared, not the usual shared and things like that
p
Humm, I am able to see the “shared” framework from the swift package code. This is the project, you can check. I named the shared framework “ComposeApp” in my case. https://github.com/pablichjenkov/macao-marketplace Pretty much check that you have that same project structure. I actually went over the documentation page and tend to agree that is missing something.
m
Thanks! I'll check that out
You also don't seem to have the pre-action script at all - for the swift package or the app
p
Well, that line pulls another Swift Package that I am using. The other Swift Package development project I have it locally, I haven't published it on GitHub. Uses Xcframework with binaryTarget in the Package.swift but that compiles slower than the direct SPM integration.
How do you check the preaction, if I have it or not? In the
project.xcodeproj
? I just checked and I have it there.
🤔 1
m
okay, so this seems to be a bit different thatn what the tutorial shows with a pre-action script that runs embedAndSign and then automagically the local spm package has reference to the shared module? Yes, I checked there. I am on the dev branch
p
Check under
Build
tab, in the screenshot
Run
is the tab selected.
m
I have no idea why, but nothing there either
damn, I think those might not be commited to the repository. Just changed some in my project and nothing changes in the git staging 🤯
p
Me neither TBH. I am not sure if I am pushing all Xcode configurations to the repo. I might have mistakenly gitignored some config files. But I can confirm on my local I have the same as in the documentation.