mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 14:42:07 +02:00
28 lines
439 B
Markdown
28 lines
439 B
Markdown
# swift
|
|
|
|
> Create, run and build Swift projects.
|
|
> More information: <https://swift.org>.
|
|
|
|
- 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`
|