jedisct1 / swift-sodium

Safe and easy to use crypto for iOS and macOS
ISC License
519 stars 185 forks source link

[help needed] Import as pod #269

Closed mkaczmarczyk1986 closed 2 months ago

mkaczmarczyk1986 commented 2 months ago

Hi, I have a problem with library. I've mobile app which I write for customer. As new feature I've to add external library (private library written by external company) which includes Sodium. When I'm importing it as it is described in readme everything is working well but unfortunately I'm build app with ci/cd and I can't open xcode there to add external SPM package (via File -> Swift packages etc.). So I've tried to add this as a pod in podfile and install it. But I have problem there. After add this to podfile: image I've got error in this external library: image So I've added xcframework from source code in xcode (I will move it later to podfile but for test I've done it this way): image

And after that I've got error: image

So I have some questions:

johnalanwoods commented 2 months ago

Use swift package resolve to pull packages from command line which are defined in Package.swift

mkaczmarczyk1986 commented 2 months ago

Thank You vey much for response but I don't if I can do it. I don't have Package.swift in my project (it is created with cocoapods). So I can't run swift package resolve. All tutorials which I've seen are made with path open xcode, go to file, and add package dependency. This can't be done with CI/CD where project is created after git checkout.

johnalanwoods commented 2 months ago

no probs - I'd move away from Cocoapods and then move to define a Package.swift, then you can do the same thing you do in Xcode, but programatically

mkaczmarczyk1986 commented 2 months ago

Thank You. I will try this way. I could be a little bit difficult for me but thank You for advice.