Open Source Updates for Swift Projects - Issue #12

Type safe handling of SFSymbols

Do you know this popular (1.3k ⭐ ) Swift package?

You should!

With SFSafeSymbols...

  • ... 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.

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.

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.