一个无需 Xcodeproj 即可创建跨平台 Swift 应用的工具。
如果您觉得 Swift Bundler 有用,请考虑成为赞助者来支持我。我把大部分业余时间都花在开源项目上,每一次赞助都能帮助我投入更多时间为社区打造高质量的工具。
文档托管在Swift Bundler 网站上。
使用 mint 安装最新版本的 Swift Bundler
mint install stackotter/swift-bundler
如果您之前通过安装脚本安装了 Swift Bundler,则必须删除 /opt/swift-bundler
目录(需要 sudo 权限)。
有关更多安装方法,请参阅文档。
安装 Swift Bundler 后,可以使用包模板快速上手。以下部分将引导您创建和运行一个简单的“Hello, World!” SwiftUI 应用程序。
# Create a new app from the SwiftUI template.
swift bundler create HelloWorld --template SwiftUI
cd HelloWorld
# Build and run the app.
swift bundler run
# Creates the files necessary to get xcode to run the package as an app.
# Only needs to be run once unless you delete the `.swiftpm` directory.
swift bundler generate-xcode-support
# Open the package in Xcode
open Package.swift
要了解更多关于 Swift Bundler 的信息,请参阅文档。
非常欢迎各种形式的贡献!只需在开始之前查看贡献指南。浏览开放的 issue 以获取贡献的想法。
如果您使用 Swift Bundler 构建了一个应用,我很乐意听到!只需打开一个 issue 或提交一个 PR 以将其添加到列表中。