JFROG —> PUBLISH Swift Package Manager —> Consume that in various iOS Projects

203 views Asked by At

I am new to JFrog. Need your help regarding Swift package manager hosting and consuming.

JFrog supports swift registry. I have created one swift package manager and pushed it to JFrog-> Artifacts->local repository.(Following JFrog Documentation).

How to consume this Swift Package Manager in other projects?

I went through many questions here but I do not see the solution.

Please provide assistance regarding publishing part also.

2

There are 2 answers

2
JanMensch On

SPM packages can only be consumed via

  1. Git URL
  2. Directory paths on your own local machine

and they usually contain the source code of the package.

JFrog is used to distribute binaries of the libraries, not the source code.

So you should either decide on either consume the source code directly via SPM, or write a script that downloads the compiled binary library into your project where you then can reference it. But you can't use SPM to get a library from JFrog.

1
avivalluf On

I created a public github repository where I store the Package.swift file that points to binaryTarget hosted on jfrog