- Open Source Swift Project Updates
- Posts
- Issue #1 - Turn Me Loose
Issue #1 - Turn Me Loose
Welcome to the first issue of the bi-weekly newsletter "Open Source Updates for Swift Projects". Learn about new projects and innovations of popular projects that help you as a Swift / iOS developer.
I'd love to receive your input and suggestions to include in this newsletter. Please share them with me via email.
Swift Structured Concurrency in Nuke 11
Swift Structured Concurrency was THE hot topic in last year's WWDC. It is not an easy undergoing to update projects. Happy to see that Nuke, a popular Image Loading System, embraces Swift Structured Concurrency with full feature parity with legacy completion-based APIs in its latest version 11.0
Turning it up to 11 with the addition of full Swift Concurrency support and the new documentation built using DocC
β Alex Grebenyuk π€ Inactive (@a_grebenyuk)
1:35 PM β’ Jul 20, 2022
There are no major source-breaking changes in this release. Instead, it adds dozens of API refinements to make the framework more ergonomic.
Work with the App Store Connect API 2.0
Bagbutik 2.0 already supports many new endpoints of the App Store Connect API 2.0.
Just released version 2.0 of bagbutik.dev πͺ with the many new endpoints in App Store Connect API 2.0 π€© Support for customer reviews, in-app purchases, subscriptions and more π Also got to future proof the spec decoder and swift generator. Ready for the next spec! π·π»ββοΈ
β Morten Bjerg Gregersen (@mortengregersen)
10:53 PM β’ Jul 12, 2022
Soon the open-source SDK from Antoine v.d. SwiftLee will follow. If you want a preview, check out his 2.0 Beta version.
The Swift SDK to work with the App Store Connect API from Apple. - Release 2.0.0 Beta 1 Β· AvdLee/appstoreconnect-swift-sdk
Generate man pages with Swift Argument Parser
ArgumentParser 1.1.3 includes a SwiftPM plugin for generating man pages. It is suggested that you can explore the functionality and configuration by running swift package plugin experimental-generate-manual --help from your package root.
But hold your horses! Due to an accident, the plugin is only visible within ArgumentParser. A pending PR just waits to get merged to fix the issue.
fix: π Declare `GenerateManualPlugin` as plugin product Β· Pull Request #456 Β· apple/swift-argument-parser Β· GitHub β github.com
ArgumentParser 1.1.3 includes a SwiftPM plugin for generating man pages. However, this plugin is not visible to packages that declare ArgumentParser as a package dependency. Defining a product of type plugin in the package manifest will solve that.
You might ask: "What is the advantage of man pages over the generated help option?" β¬οΈ
When to use SwiftPM plugin for generating `man` pages? - ArgumentParser - Swift Forums β forums.swift.org
Get inspired or chime in into the discussion
Code Formatting With Swift Package Plugins
With Swift 5.6 it is possible to write either command (or build tool) Swift Package plugins. Xcode 14 integrates command plugins and allows them to operate on Xcode projects. No wonder developers have started to implement plugins. A widespread use case is to format source code.
The Airbnb Swift Style Guide repo now includes a Swift Package Manager command plugin that reformats the Swift code in your package to follow our style guide. github.com/airbnb/swift/p⦠It's super easy to integrate in an existing project!
β Cal Stephens (@calstephens98)
2:36 AM β’ Jul 20, 2022
A few days earlier, I created a less opinionated plugin that uses https://github.com/nicklockwood/SwiftFormat and works on projects in Xcode 14.
Meet SwiftFormatPlugin
An open-source Swift Package Plugin that can format source code belonging to your Swift Package or Xcode Project
Use it or learn from it how to build a command plugin.
β Marco Eidinger π§π»βπ» (@MarcoEidinger)
9:35 AM β’ Jul 19, 2022
How to find Swift Package Plugins?
You can search for plugins on Swift Package Index :)
With Swift 5.6, Xcode and the Swift Package Manager gained a new product type, plugins, and weβre delighted to announce we now have support for filtering search results by whether or not they include a plugin.
Tuist & XcodeGen supports new product types
Xcode 14 introduced a few new frameworks and associated extension product types:
The new extensions have a new product type com.apple.product-type.extensionkit-extension.
If you use tools like https://github.com/tuist/XcodeProj and https://github.com/yonaskolb/XcodeGen to avoid messing with .xcodeproj files manually, then you are probably happy to hear that those new product types are supported in their latest releases.
Add .extensionKitExtension as the new PBXProductType
Added support for new target type extensionkit-extension in Xcode 14 #1228 @aleksproger
URLCompatibilityKit
Another shameless plug: I created a lightweight, dependency-free Swift Package to backport the new URL APIs from iOS 16.
Meet URLCompatibilityKit - get URLs for system folders as easy as in iOS 16