Hi, I'm starting with multiplatform development and right now I am struggling if there is a way to create a binary SPM zip.
I found https://github.com/ge-org/multiplatform-swiftpackage a KMMBridge. The former seems abandoned and the later seems not to support precompiled binaries in SPM.
But I could have missed something easily. Thank you.
If you want to distribute it, you need to publish the package.swift file as well as the XCFramework and you need to include the checksum in package.swift
p
psh
10/04/2023, 2:33 PM
All of those steps (publish the package.swift file along with the ZIP of the compiled binary framework along with the correct computed checksum) are steps that KMMBridge does when you configure it to publish to SPM.
j
Jan Skrasek
10/04/2023, 2:34 PM
Thanks for the replies. So I'll explore it more, I'm a bit lost but that's beceause I'm new to this.
Jan Skrasek
10/04/2023, 2:36 PM
I need to publish it to gitlab package registry, so I'm a bit lost there if it is even possible, how to produce the zip and upload on my own.
p
psh
10/04/2023, 2:39 PM
KMMBridge makes use of the gradle maven artifact publishing under the hood. If you setup Gitlab package hosting, configured in your gradle file with appropriate deploy keys (and I believe .netrc - our docs talk about that for Github) you should be able to host the binaries. The Package.swift file is committed back to your repo, along with tags for versions.
Its been a little while, but I had all that working as an experiment, so the details are a little vague in my head right now.