GitHub : @giginet • Tokyo 🇯🇵 • Work for LY Corporation(2022~) • iOS DevOps Engineer for LINE • iOS Development experience since iOS 4 (2010~) • ❤ 👾 Gaming
Swift ecosystem • Practical Examples of Developer tools • Implement your tool • Implementation / Testing • For the more usable tools • Documentation / Deployment / CI • Contribute to Community
tool to generate XCFramework • Convert Swift Package to XCFramework • Share prebuilt frameworks among developers 1. Resolve and checkout package manifest with SwiftPM 2. Scipio generates Xcode Project from each package 3. Build the projects with xcodebuild 4. xcodebuild generates XCFramework How does Scipio work? Resolve manifests Fetch packages Generate Xcode Project Build XCFrameworks https://speakerdeck.com/giginet/standardizing-build-system-using-modern-swift-packages-in-line
i cial development foundations are available • Swift Package Manager (2015) • Xcode Integration (2019) • swift-syntax(2017) • swift-argument-parser(2020) • Package Plugin (2022) • swift-testing(2023)
Can provide Command Line Interface / Xcode GUI • Example • docc-plugin • swift-testing-revolutionary • See ”Meet Package Plugins" in WWDC22 • https://developer.apple.com/videos/play/wwdc2022/110359/
counter with each repetition.") var includeCounter = false @Option(name: .shortAndLong, help: "The number of times to repeat 'phrase'.") var count: Int? = nil @Argument(help: "The phrase to repeat.") var phrase: String mutating func run() throws { let repeatCount = count ?? 2 for i in 1...repeatCount { if includeCounter { print("\(i): \(phrase)") } else { print(phrase) } } } } Options
counter with each repetition.") var includeCounter = false @Option(name: .shortAndLong, help: "The number of times to repeat 'phrase'.") var count: Int? = nil @Argument(help: "The phrase to repeat.") var phrase: String mutating func run() throws { let repeatCount = count ?? 2 for i in 1...repeatCount { if includeCounter { print("\(i): \(phrase)") } else { print(phrase) } } } } Implementations
official way to manage binaries for the user side • Mint • https://github.com/yonaskolb/Mint • No way to distribute prebuilt binaries • Need to build by users
Host executables for multi architecture in ZIP file • https://github.com/swiftlang/swift-evolution/blob/main/proposals/ 0305-swiftpm-binary-target-improvements.md
Bundles • freddi-kit/ArtifactBundleGen • Command Plugin to wrap executables in Artifact Bundle format • https://github.com/freddi-kit/ArtifactBundleGen