How do I use Swift Package Manager with an existing macOS project?

后端 未结 4 1805
北海茫月
北海茫月 2021-01-03 20:30

I\'ve been using Cocoapods to manage dependencies for my Swift project. I came across this package which is not listed at Cocoapods. Instead it suggests using Swift Package

4条回答
  •  囚心锁ツ
    2021-01-03 20:43

    I think SPM is only compatible with Mac command line executables or libraries. This explicitly states SPM doesn't support iOS, watchOS, or tvOS platforms at all. But, since macOS AppKit/Cocoa application targets are very similar to iOS or tvOS Xcode targets, I would say this statement implies that SPM can't be used with macOS Cocoa applications out of the box either, which is what I think you're hoping for.

    It looks like there is some work here on how to use it with iOS application targets which should largely translate to a macOS Cocoa target.

提交回复
热议问题