一个无需 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 的更多信息,请参阅文档。
欢迎各种形式的贡献!在开始之前,请务必查看贡献指南。阅读未解决的问题,获取贡献的想法。
如果您使用 Swift Bundler 构建了应用,我很乐意了解!只需打开一个 issue 或提交一个 PR,将其添加到列表中。