Changelark for Swift
A native SwiftUI sheet that shows What's new once after every update, with votes and anonymous comments. iOS 16 or later, no other dependencies.
Install
In Xcode, choose File → Add Package Dependencies, enter the repository URL and add the Changelark library to your app target:
https://github.com/itsmylife44/changelarkConfigure and attach
Configure once at launch with the public key from the Install tab and your Changelark server's address, then add .changelarkWhatsNew() to the root view. The version comes from CFBundleShortVersionString.
import SwiftUI
import Changelark
@main
struct MyApp: App {
init() {
Changelark.configure(
appKey: "clk_…", // the Install tab in the dashboard
baseURL: URL(string: "https://your-changelark.example")!
)
}
var body: some Scene {
WindowGroup {
ContentView().changelarkWhatsNew()
}
}
}When the sheet appears
- First install: the version is recorded quietly. Pass
treatFirstLaunchAsUpdate: trueto show it anyway. - New version: its notes show once, the first time the app opens.
- Seen or older version: skipped.
- Notes not published yet: it checks again on the next launch, for up to three days.
- You replied to someone: on their next launch without new notes, the sheet opens on the feedback chat so they see your answer. Once per reply.
To open it yourself, for example from a settings row:
Button("What's new") {
Task { await Changelark.showWhatsNew() }
}Votes and comments
People vote on the update and on comments without an account, accept short guidelines before their first comment, and can reply, report, block someone or delete their own comment. Your replies from the dashboard carry a Developer badge.
Bug reports
Under the reactions there's a Report a bug link. It opens a short form and attaches a screenshot of the screen behind the sheet, so you see what the person saw. They can turn the screenshot off. Reports are private: they land in the Bugs tab of your inbox and nowhere else. To send one from your own screen, call client.reportBug(text:screenshot:device:).
Languages
The package sends the phone's preferred language. If you added a translation for it in the dashboard (or App Store Connect imported one), the sheet shows that; otherwise your original notes.
App Attest
To accept votes and comments only from genuine copies of your app, turn on App proofs for the app in the dashboard (with your Team ID and bundle ID), add the App Attest capability in Xcode, and configure the package with useAppAttest: true. The package creates and attests its key once, then signs every write. Simulators don't support App Attest, so test it on a device.
Changelark.configure(
appKey: "clk_…",
baseURL: URL(string: "https://your-changelark.example")!,
useAppAttest: true
)