Open Source Updates for Swift Projects - Issue #12
Type safe handling of SFSymbols
Do you know this popular (1.3k ⭐ ) Swift package?
If you are using SF Symbol strings like “square.on.circle” in your project. Take a look at SFSafeSymbols framework. It allows you to replace such strings with static type-safe identifiers like .squareOnCircle
I’ve just added it to my project.
— David Kennedy is @[email protected] (@DaveAppDev)
Jul 4, 2022
These are 3 essential Swift packages that I use in most of my SwiftUI apps
📦 SFSafeSymbols: Safely access Apple's SF Symbols using static typing
📦 SwiftUI-Introspect: Introspect underlying UIKit components from SwiftUI
📦 EasyStash: Easy data persistence in Swift
— Khoa 🔥 (@onmyway133)
May 21, 2022
... you can be sure your symbol code won't crash due to typos or symbol availability issues. This is because all symbols are tested via a CI (on the latest iOS & tvOS versions and also some earlier OS versions).
... lookups in the SF Symbols app (e. g. about available layersets, available localizations & the look of the symbol) are no longer needed because every symbol is documented in code.
... multiple SF Symbols versions are supported at the same time (via utilization of the @availability flag). Each symbol is only made available on those platform versions where Apple says it's available.
... renamed symbols can be detected easily (via a deprecation notice which suggests the use of the new name at the same time).
Recently version 4.1.0 was released which adds
Advanced numeric data types for Swift
Swift NumberKit is a cross-platform framework implementing advanced numeric data types for the Swift programming language on macOS, iOS and Linux. Currently, the framework provides three new numeric types, each represented as a struct:
BigInt: arbitrary-precision signed integers
Rational: signed rational numbers
Complex: complex floating-point numbers
Using this framework makes you more isolated from potential backward incompatible changes by Apple, which were encountered in the past.
Recently version 2.4.2 was released which adds
Support random number generation for Complex
Migrated project to Swift 5.7 and Xcode 14
If you work with an older Xcode version, you can use an older version of the framework. NumberKit has been around for several years.
Easy map visualization in SwiftUI
A new SwiftUI wrapper for MKMapView that offers a couple more features compared to SwiftUI.Map.
In case anybody needs to show a map with lines connecting map markers in #SwiftUI I got you covered 😉
Also feel free to enhance the package if you need some special use case 🙃
— Lukas Pistrol (@lukeeep_)
Dec 29, 2022
Better previews on Mac
MacPreviewUtils is a new Swift package with handy tools for SwiftUI previews on macOS.
You will not only get a translucency fix
but also features like
Am I a SwiftUI Preview?
Pin SwiftUI Preview to a Specific Display
Debug Previews using print()
CLI tool to mass insert/delete conditional compilation statements
Here is something new from my personal collection.
Early Christmas present for all Swift developers who have everything
=> CLI tool to mass insert/delete conditional compilation statements
— Marco Eidinger 🧑🏻💻 (@MarcoEidinger)
Dec 22, 2022
Sneak Preview: swift-device-authority
This command-line tool to generate iOS authority profiles is not yet ready but you can follow along as its implementation progresses.
You will be able to create configuration profiles on iOS to secure access to certain functionality. This acts as a form of keycard, allowing the right people access to the right areas - useful for indie developers and large companies who want to grant access to debug menus to employees only.
Of course, building it in the open if you want to take an early look:
⚠️ It is incomplete and untested. Follow the steps in the blog post for now which are known to be working.
— James Sherlock (@JamesSherlouk)
Jan 3, 2023