Swift Packge Manager

跨平台
MAC OS
Ubuntu
Feature Platforms

How to use

SwiftPM Commands
Packages Use Git

Creating:
terminal
mkdir helloworld
cd helloworld/
swift package init --type executable

Run:
open.
swift run

Anatomy of a Package
1.dependencies
2.targets
3.products

Run Tests
swift test --parallel --filter ByteBufferTest

Design of SwiftPM:
fast :isolated build environment
safe :scalable to large dependency graphs
expressive:Swift language manifest format

Support for Building Other Languages
C C++ OC
不支持将其中一个和Swift混合在一个Target

Building
llbuild
SwiftPM's build execution engine
Provides fast and correct incremental builds
Also used by Xcode's new build system
Part of the Swift open source project

Build Environment Isolation:
SwiftPM builds packages in isolation
Builds are sandboxed
No arbitrary commands or shell scripts

Edit Mode
开发多版本

Package.swift Manifest API Evolution:
Package API can be updated with each new Swift version
Previous API is still available
Allows using new Swift tools without updating the manifest
可以指定版本

Publish :
git tag x.x.x

Package Content Verification
安全校验

Cross-Platform Sandboxing

Fork Support

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,196评论 0 10
  • 我相信,相信平静里有假象是波纹截断的迷宫 孩子走不出迷宫,迷宫的真相真相从镜子里折射,镜子里的人人坨了脊背,脊背上...
    长舒影阅读 3,047评论 4 9
  • 01 我去参加一个供应商颁奖典礼。领奖的人都是获奖公司的高层代表。 其中一个女孩引起了我的注意,她连着上台领奖几次...
    4a34c445cdc5阅读 3,523评论 0 3
  • 小朋友写着作业,突然说:“妈妈,我想睡觉了”,“好吧,先眯几分钟,过会叫你起来我们再继续”,小朋友对老师布置的作业...
    Kaia的简慢笔记阅读 1,310评论 0 0
  • 屋里新来的阿姨,打鼾声真大,睡不着了……
    弦姬2019阅读 1,792评论 0 0

友情链接更多精彩内容