Introducing SwiftMacrosKit and PermissionKit

I’ve recently open-sourced two Swift packages aimed at reducing boilerplate and improving developer ergonomics across Apple platforms.

SwiftMacrosKit

SwiftMacrosKit provides 100+ Swift macros across multiple categories:

  • Creational patterns
    @Singleton, @Builder, @Factory

  • Validation & constraints
    @Validated, @Email, @RegexValidated

  • Async & concurrency
    @Retry, @Timeout, @Debounce

  • Persistence
    @UserDefault, @Keychain, @CloudSync, @CoreData

  • Networking
    @Endpoint, @GET, @POST, @MockResponse

  • Additional utilities for SwiftUI, logging, security, testing, and more.

The goal is to reduce repetitive infrastructure code while keeping APIs lightweight and idiomatic to Swift.

PermissionKit

PermissionKit is a unified permissions framework for Apple platforms.

Features include:

  • Async/await-first API

  • Support for 45+ Apple permissions

  • iOS, macOS, watchOS, and tvOS support

  • Combine and AsyncStream integrations

  • SwiftUI permission components

  • CLI support for Info.plist and entitlement generation

  • Built-in testing utilities

  • Zero external dependencies

Links

SwiftMacrosKit

PermissionKit

Both packages are MIT licensed, SPM-compatible, and actively maintained.

Feedback, contributions, suggestions, and issue reports are very welcome.

3 Likes

The most interesting part in this macros was the Networking part for me.

Nice Job​:ok_hand:

1 Like

I’d really appreciate it if you could take a look at the repositories and share your experience and feedback.

  • Suggestions for enhancements or new macros are welcome.
  • Any fixes or improvements to the existing macros would be greatly appreciated.

A bit off topic, but imho builder and factory patterns make no sense in Swift: for builder just create additional init and factory for enum not adding any meaningful stuff.