
Tipkit
Implement Apple TipKit onboarding tips with rules, events, custom styles, and tests in a Swift 6 iOS app.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill tipkitWhat is this skill?
- Complete AdvancedSearchTip example combining @Parameter login rules and donated search events
- TipView, popoverTip placement, and custom TipViewStyle patterns
- TipGroup sequencing for ordered feature discovery
- Testing strategies plus TipKit action buttons and onboarding integration
- Full app integration example targeting iOS 17+ with Swift 6.3 conventions
Adoption & trust: 1.7k installs on skills.sh; 713 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Vercel React Native Skillsvercel-labs/agent-skills
Firebase Basicsfirebase/agent-skills
Building Native Uiexpo/skills
Firebase Ai Logic Basicsfirebase/agent-skills
Native Data Fetchingexpo/skills
Firebase Firestorefirebase/agent-skills
Journey fit
Primary fit
TipKit UI ships as part of the product surface during Build, especially feature discovery and first-run flows. Frontend shelf because TipView, popoverTip placement, TipGroup sequencing, and SwiftUI previews are user-visible SwiftUI layers.
Common Questions / FAQ
Is Tipkit safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Tipkit
# TipKit Patterns Reference Complete implementation patterns for TipKit including custom styles, event-based rules, tip groups, testing strategies, onboarding flows, and SwiftUI previews. All examples target iOS 17+ with Swift 6.3 conventions. ## Contents - [Complete Tip with Rules and Events](#complete-tip-with-rules-and-events) - [TipView and popoverTip Placement](#tipview-and-popovertip-placement) - [Event-Based Rule with Donation Counting](#event-based-rule-with-donation-counting) - [Custom TipViewStyle](#custom-tipviewstyle) - [TipGroup Sequencing](#tipgroup-sequencing) - [Testing Strategies](#testing-strategies) - [Tip with Action Buttons](#tip-with-action-buttons) - [Integration with Onboarding Flow](#integration-with-onboarding-flow) - [Full App Integration Example](#full-app-integration-example) ## Complete Tip with Rules and Events A full-featured tip combining parameter-based and event-based rules. The tip appears only after the user has logged in and opened the app at least three times, ensuring they are familiar with the basics before seeing advanced feature discovery. ```swift import TipKit struct AdvancedSearchTip: Tip { // Parameter rule: user must be logged in @Parameter static var isLoggedIn: Bool = false // Event rule: user must have performed searches static let searchPerformed = Tips.Event(id: "searchPerformed") var title: Text { Text("Try Advanced Search") } var message: Text? { Text("Filter results by date, category, and location for faster discovery.") } var image: Image? { Image(systemName: "magnifyingglass") } // All rules must pass before the tip becomes eligible var rules: [Rule] { #Rule(Self.$isLoggedIn) { $0 == true } #Rule(Self.searchPerformed) { $0.donations.count >= 3 } } var options: [TipOption] { MaxDisplayCount(5) } } ``` ### Donating to Events Place event donations at the point where the user action occurs. Each donation increments the internal counter that rules evaluate against. ```swift struct SearchView: View { @State private var query = "" var body: some View { SearchBar(text: $query, onSubmit: { performSearch(query) // Donate each time the user searches AdvancedSearchTip.searchPerformed.donate() }) } } ``` ### Setting Parameters Set parameter values when the relevant app state changes. Parameters persist across launches via the TipKit datastore. ```swift func handleLoginSuccess() { AdvancedSearchTip.isLoggedIn = true } ``` ## TipView and popoverTip Placement ### Inline TipView in a List Place a `TipView` as a list row for contextual inline discovery. The tip appears as part of the list content and animates away when dismissed or invalidated. ```swift struct ItemListView: View { let filterTip = FilterTip() @State private var items: [Item] = [] var body: some View { List { TipView(filterTip) ForEach(items) { item in ItemRow(item: item) } } .navigationTitle("Items") .toolbar { ToolbarItem(placement: .primaryAction) { Button { showFilters() filterTip.invalidate(reason: .actionPerformed) } label: { Image(systemName: "line.3.horizontal.decrease.circle") } .popoverTip(filterTip, arrowEdge: .top) } } } } ``` ### Popover on Navigation Bar Button Attach a popover tip to a toolbar button. The popover arrow points to the button, drawing the user's attention to the exact control. ```swift struct EditorView: View { let undoTip = UndoShortcutTip() var body: some View { TextEditor(text: $text) .toolbar { ToolbarItem(placement: .primaryAction) { Button("Undo", systemImage: "arrow.u