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)
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)
Jul 12, 2022
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.
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?" ⬇️
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. It's super easy to integrate in an existing project!
— Cal Stephens (@calstephens98)
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.
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)
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
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