tipkit▌
dpearson2699/swift-ios-skills · updated Apr 8, 2026
Add feature discovery tips, contextual hints, and onboarding coach marks to
- ›iOS 17+ apps using Apple's TipKit framework. TipKit manages display frequency,
- ›eligibility rules, and persistence so tips appear at the right time and
- ›disappear once the user has learned the feature.
TipKit
Add feature discovery tips, contextual hints, and onboarding coach marks to iOS 17+ apps using Apple's TipKit framework. TipKit manages display frequency, eligibility rules, and persistence so tips appear at the right time and disappear once the user has learned the feature.
Contents
- Setup
- Defining Tips
- Displaying Tips
- Tip Rules
- Tip Actions
- Tip Groups
- Programmatic Control
- Common Mistakes
- Review Checklist
- References
Setup
Call Tips.configure() once in App.init, before any views render. This
initializes the tips datastore and begins rule evaluation. Calling it later
risks a race where tip views attempt to display before the datastore is ready.
import SwiftUI
import TipKit
@main
struct MyApp: App {
init() {
try? Tips.configure([
.datastoreLocation(.applicationDefault)
])
}
var body: some Scene {
WindowGroup { ContentView() }
}
}
DatastoreLocation Options
| Option | Use Case |
|---|---|
.applicationDefault |
Default location, app sandbox (most apps) |
.groupContainer(identifier:) |
Share tips state across app and extensions |
.url(_:) |
Custom file URL for full control over storage location |
CloudKit Sync
Sync tip state across a user's devices so they do not see the same tip on every device. Add the CloudKit container option alongside the datastore location.
try? Tips.configure([
.datastoreLocation(.applicationDefault),
.cloudKitContainer(.named("iCloud.com.example.app"))
])
Defining Tips
Conform a struct to the Tip protocol. Provide a title at minimum.
Add message for supporting detail and image for a leading icon. Keep
titles short and action-oriented because the tip appears as a compact callout.
import TipKit
struct FavoriteTip: Tip {
var title: Text { Text("Pin Your Favorites") }
var message: Text? { Text("Tap the heart icon to save items for quick access.") }
var image: Image? { Image(systemName: "heart") }
}
Properties: title (required), message (optional detail), image (optional leading icon), actions (optional buttons), rules (optional eligibility conditions), options (display frequency, max count).
Lifecycle: Pending (rules unsatisfied) -> Eligible (all rules pass) -> Invalidated (dismissed, actioned, or programmatically removed). Once invalidated, a tip does not reappear unless the datastore is reset.
Displaying Tips
Inline Tips with TipView
Embed a TipView directly in your layout. It renders as a rounded card that
appears and disappears with animation. Use for tips within scrollable content.
let favoriteTip = FavoriteTip()
var body: some View {
VStack {
TipView(favoriteTip)
ItemListView()
}
}
Popover Tips with .popoverTip()
Attach a tip as a popover anchored to any view. The framework draws an arrow from the popover to the anchor. Use for tips pointing to a specific control.
Button { toggleFavorite() } label: { Image(systemName: "heart") }
.popoverTip(favoriteTip)
// Control arrow direction (omit to let system choose)
.popoverTip(favoriteTip, arrowEdge: .bottom)
Custom TipViewStyle
Create a custom style to control tip appearance across the app. Conform
to TipViewStyle and implement makeBody(configuration:).
struct CustomTipStyle: TipViewStyle {
func makeBody(configuration: Configuration) -> some View {
HStack(spacing: 12) {
configuration.image?
.font(.title2)
.foregroundStyle(.tint)
VStack(alignment: .leading, spacing: 4) {
configuration.title
.font(.headline)
configuration.message?
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
.padding()
}
}
// Apply globally or per view
TipView(favoriteTip)
.tipViewStyle(CustomTipStyle())
Tip Rules
Rules control when a tip becomes eligible. All rules in the rules array
must pass before the tip displays. TipKit supports two rule types:
parameter-based and event-based.
Parameter-Based Rules
Use @Parameter to track app state. The tip becomes eligible when the
parameter value satisfies the rule condition.
struct FavoriteTip: Tip {
@Parameter
static var hasSeenList: Bool = false
var title: Text { Text("Pin Your Favorites") }
var rules: [Rule] {
#Rule(Self.$hasSeenList) { $0 == true }
}
}
// Set the parameter when the user reaches the list
FavoriteTip.hasSeenList = true
Event-Based Rules
Use Tips.Event to track user actions. Donate to the event each time the
action occurs. The rule fires when the donation count or timing condition
is met. This is ideal for tips that should appear after the user has
performed an action several times without discovering a related feature.
struct ShortcutTip: Tip {
static let appOpenedEvent = Tips.Event(id: "appOpened")
var title: Text { Text("Try the Quick Action") }
var rules: [Rule] {
#Rule(Self.appOpenedEvent) { $0.donations.count >= 3 }
}
}
// Donate each time the app opens
ShortcutTip.appOpenedEvent.donate()
Combining Multiple Rules
Place multiple rules in the array. All must pass (logical AND).
struct AdvancedTip: Tip {
@Parameter
static var isLoggedIn: Bool = false
static let featureUsedEvent = Tips.Event(id: "featureUsed")
var titleDiscussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
general reviewsRatings
4.8★★★★★63 reviews- ★★★★★Benjamin Jackson· Dec 28, 2024
tipkit fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Yusuf Garcia· Dec 24, 2024
I recommend tipkit for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Yuki Wang· Dec 4, 2024
tipkit fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Aanya Mehta· Dec 4, 2024
Registry listing for tipkit matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Zaid Thomas· Nov 23, 2024
We added tipkit from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Noor Li· Nov 23, 2024
Solid pick for teams standardizing on skills: tipkit is focused, and the summary matches what you get after install.
- ★★★★★Emma Jain· Nov 19, 2024
We added tipkit from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Yuki Zhang· Nov 15, 2024
Useful defaults in tipkit — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Emma Wang· Oct 14, 2024
Solid pick for teams standardizing on skills: tipkit is focused, and the summary matches what you get after install.
- ★★★★★Aarav Gonzalez· Oct 14, 2024
We added tipkit from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 63
1 / 7