tldr/pages/common/swift.md

29 lines
439 B
Markdown
Raw Normal View History

2018-05-15 11:26:34 +01:00
# swift
> Create, run and build Swift projects.
> More information: <https://swift.org>.
2018-05-15 11:26:34 +01:00
- Invoke the interactive interpreter (REPL):
`swift`
- Execute a program:
`swift {{file.swift}}`
- Start a new project with the package manager:
`swift package init`
- Generate an Xcode project file:
`swift package generate-xcodeproj`
- Update dependencies:
`swift package update`
- Compile project for release:
`swift build -c release`