Hey, I’m following the <SPM export setup>, to inte...
# multiplatform
e
Hey, I’m following the SPM export setup, to integrate my KMP library into my native iOS project. But Upload to Github release step is not accurate pointing out that “Copy Link Address” for the .zip file is the address you need to use for your Package.swift target.url, that url only works on web browser. Reading into this question on StackOverFlow seems like the way of doing it is getting the real url using github API, which I used and it works, What I want to know is if somebody else had success using the link from “Copy Link Address”? Note: This is a private repo and I already have authentication set, so I can download my binary when using a url like https://api.github.com/repos/organization/libName/releases/assets/123456789.zip, but not when using a url like https://github.com/organization/libName/releases/download/0.1.0/ABC.xcframework.zip • Maybe “Copy Link Address” works under certain conditions that I don’t know • Or probably I’m making a mistake in the creation of the github release. Note 2: I know that there is a plugin called KMMBridge, but the documentation is based on setting your project using a template, which I cannot do at this point. Any help is appreciated.
r
I believe those docs don't take authentication into account, so if your repo is private that might be your issue. A lot of KMMBridge has evolved since I worked on it, but somewhere in the docs I think they should talk about providing authentication to artifacts via a netrc file, and that same setup should work for you even if you're not using KMMBridge.
e
Hey Russ, I think I already have authentication set up correctly, since I can download the binary from my private repo using releases/assets/{assetID} endpoint: https://api.github.com/repos/organization/libName/releases/assets/123456789.zip, but not when using releases/download/{tag}/{binaryName} https://github.com/organization/libName/releases/download/0.1.0/ABC.xcframework.zip. Are you saying that it is possible to download the binary even with the 2nd url?
r
I'm not sure about the url difference, sorry. Been a couple years now since I was deep on that stuff.
e
No worries, thank you!