Hacker News new | ask | show | jobs
by jicea 4311 days ago
Hello,

Is there already a built-in package manager in Swift? Maybe CocoaPods will have support for Swift but, as a completely new environnement, I'm hoping that Apple will add a dependency manager for Swift.

3 comments

Xcode 6 provides better support for third-party frameworks, which certainly makes distributing packages without a third-party took like CocoaPods easier, but it doesn't have anything resembling a proper package manager or dependency resolution tool.

Right now, the state of distributing libraries in Swift seems to be "add it as a git submodule, and either add the xcodeproj and link the compiled framework or just drag in the .swift files, but let's hope the community comes up with something better soon".

With both iOS & OSX now supporting frameworks, CocoaPods has the potential of becoming much more elegant. See progress on this here: https://github.com/CocoaPods/CocoaPods/pull/2222
Currently, I'm not aware of one.

However, once Swift comes out of beta (and with some time) I think the best practices to distribute libraries will become evident.

It would be great if Apple released a dependency manager for Swift, though!

I think Apple should build the basic hooks so that package manager like CocoaPods is possible but a better solution will emerge if the package system is handled outside of Apple which is likely have a huge legal that prevents healthy ecosystem.