Noureddine RAMDI / WhatsNewKit: streamlined feature announcement presentation for SwiftUI and Apple platforms

Created Mon, 04 May 2026 10:23:01 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

SvenTiigi/WhatsNewKit

WhatsNewKit addresses a common challenge in app development: how to present new features to users after updates without writing repetitive version-checking code. Its key innovation is the use of SwiftUI’s Environment system combined with a declarative API and protocol-based version persistence to automate “what’s new” presentations across iOS, macOS, and visionOS.

declarative feature presentation with environment-driven version tracking

WhatsNewKit is a Swift Package that provides a clean, declarative approach to showing “what’s new” content after app updates. Instead of manually checking app version numbers and deciding when to show modals or sheets, you declare your feature announcements per version using a WhatsNewCollectionProvider. This provider bundles multiple WhatsNew instances, each representing a set of features for a given version.

Under the hood, WhatsNewKit leverages SwiftUI’s Environment system by injecting a WhatsNewEnvironment. This environment holds the current app version and a version store, responsible for tracking which versions the user has already seen. The package defines a WhatsNewVersionStore protocol to abstract version persistence, with built-in implementations for UserDefaults, iCloud’s NSUbiquitousKeyValueStore, and in-memory storage. This abstraction makes it easy to customize how version data is saved and synchronized.

To present the feature announcements, you add a single .whatsNewSheet() modifier to your SwiftUI view hierarchy. This modifier observes the environment, automatically determines whether there’s a new version’s announcement to show, and presents it without further boilerplate. It also includes a patch version fallback mechanism, meaning if a user skips minor updates, the nearest major update’s content is presented to keep them informed.

WhatsNewKit supports manual presentation as well, allowing you to trigger the feature sheet programmatically if desired. This flexibility covers a range of real-world use cases.

multi-platform support and extensible architecture

One of WhatsNewKit’s strong points is its support for multiple Apple platforms: iOS, macOS, and visionOS. It also integrates with SwiftUI, UIKit, and AppKit, making it versatile for apps with mixed UI frameworks or legacy codebases.

The architecture is built for extensibility. Developers can subclass WhatsNewEnvironment to customize the environment behavior or implement their own version stores by conforming to WhatsNewVersionStore. This design lets you swap out persistence mechanisms or tweak environment logic without changing the core library.

The codebase is surprisingly clean and idiomatic Swift, focusing on clarity and developer experience. The use of protocol abstraction and environment injection aligns with modern SwiftUI patterns, reducing boilerplate and improving code maintainability.

However, this design does introduce some complexity. Setting up the environment and version store correctly requires understanding the protocol and environment injection patterns. For very simple apps or those not using SwiftUI, the library might feel heavyweight or less straightforward.

installation with Swift Package Manager

To use WhatsNewKit, add it to your project via Swift Package Manager. The README provides this snippet:

dependencies: [
    .package(url: "https://github.com/SvenTiigi/WhatsNewKit.git", from: "2.0.0")
]

Alternatively, you can add it directly through Xcode’s Swift Packages interface by searching for “WhatsNewKit”.

basic usage example

Once installed, you define your features per version like this:

struct MyWhatsNewProvider: WhatsNewCollectionProvider {
    var collections: [WhatsNew] {
        [
            WhatsNew(
                version: "2.0.0",
                features: [
                    Feature(title: "New Dark Mode", description: "Experience the app in dark mode."),
                    Feature(title: "Improved Performance", description: "Faster load times and smoother animations.")
                ]
            )
        ]
    }
}

Then you set up the environment and add the sheet modifier:

@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .environment(
                    \ .whatsNewEnvironment,
                    WhatsNewEnvironment(
                        versionStore: UserDefaultsVersionStore(),
                        whatsNewProvider: MyWhatsNewProvider()
                    )
                )
                .whatsNewSheet()
        }
    }
}

This setup means the app automatically shows the “what’s new” sheet for any new version the user hasn’t seen yet, using UserDefaults for persistence.

verdict: a pragmatic choice for SwiftUI apps with versioned feature announcements

WhatsNewKit offers a practical, idiomatic way to handle feature announcements in SwiftUI apps, removing the repetitive and error-prone task of manual version checking. Its environment-driven automatic presentation is its standout feature, making it easy to integrate and maintain.

The multi-platform and multi-UI-framework support broadens its appeal beyond pure SwiftUI apps, though UIKit and AppKit users might need to handle some integration details themselves.

The protocol-based version store abstraction is a smart design choice that enables customization and synchronization options like iCloud.

The main tradeoff is the added complexity of setting up environment injection and understanding the protocol abstractions, which could be overkill for very simple apps or teams unfamiliar with SwiftUI environment patterns.

If your app needs to present update features cleanly and automatically across Apple platforms and you are comfortable with SwiftUI, WhatsNewKit is worth considering. It builds on solid SwiftUI principles and provides a robust, extensible architecture to handle a common but often overlooked UX detail.


→ GitHub Repo: SvenTiigi/WhatsNewKit ⭐ 4,377 · Swift