📦 SwiftyLaunch Modules
🌱 App
Views
What's New View

What's New in the Update Screen

App (SwiftyLaunch Module) - What's New Update Screen

Imagine spending weeks or months on a new update and discovering that most of your users don't even know about what's new in the update? That's where the "What's New" screen comes in.

It's a screen that is automatically shown on launch after an update (After the app version changes, for example from 1.0.0 to 1.0.1), and it shows the user what has been added, changed or fixed in the update.

You can easily customize it to show the changes you want to highlight, and it's a great way to keep your users informed and engaged.

Background Image

We include a placeholder image for the background of the "What's New" screen. You can replace it with your own image by replacing the new-features.png file in the Assets.xcassets folder.

Displayed Additions

We made it super easy to showcase what's been added. Simply add or remove features from the features array. That's it!

Here's the default set of features, that you will get on a fresh SwiftyLaunch project (see thumbnail above for a preview):

WhatsNewView.swift
private let features: [Feature] = [
	Feature(
        sfSymbol: "star.fill",
         symbolColor: .green,
        title: "New Feature 1",
        description: "This is a new feature"
    ),
	Feature(
		sfSymbol: "lasso.badge.sparkles",
        symbolColor: .indigo,
        title: "New Feature 2",
		description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
	),
	Feature(
        sfSymbol: "wrench.and.screwdriver",
        symbolColor: .gray,
        title: "Bug Fixes",
		description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
	),
]

Appearance Logic

To check if the new features screen should be shown, we compare the current app version with the last opened app version in UserDefaults. If the value is "NONE" (default), this means that this is the first app launch ever, and that we should show the onboarding screen instead. If the values are different, we show the "What's New" screen.

The key to the app version UserDefaults and other UserDefaults is defined in the Constants struct.

WhatsNewView.swift
struct ShowFeatureSheetOnNewAppVersionModifier: ViewModifier {
 
	@AppStorage(Constants.UserDefaults.General.lastAppVersionAppWasOpenedAt)
	private var lastAppVersionAppWasOpenedAt: String = "NONE"
 
	@State private var showSheet: Bool = false
 
	func body(content: Content) -> some View {
		content
			.sheet(isPresented: $showSheet) {
				WhatsNewView {
					showSheet = false
				}
			}
			.onAppear {
				// ...
                showSheet = lastAppVersionAppWasOpenedAt != Constants.AppData.appVersion
                self.lastAppVersionAppWasOpenedAt = Constants.AppData.appVersion
                // ...
			}
	}
}