Intelligently educate your users about the right features at the right time with TipKit

Pinned Posts

Posts under TipKit tag

44 Posts
Sort by:
Post not yet marked as solved
4 Replies
705 Views
Hi. We want to implement TipKit, and specifically popovertips, in our app but it does not seem to be a way to customize these as you can with TipView and custom TipViewStyles. I noticed the documentation references MiniTipStyle but it only contains the standard minitipStyle. Is there a way to fully customize popovertips or is it coming in a future update? Best regards Johannes
Posted Last updated
.
Post marked as solved
13 Replies
1.5k Views
My TipKit views are showing in Previews, when I run on a Simulator, and on a physical device (running iOS 17 Beta), but if I archive and upload to TestFlight, I do not see them (on devices running iOS 17 Beta)... Anyone else encounter this? I am using the Xcode 15 GM (15A240d). I tried manually adding the framework into the target. I am worried that if I submit for Review it will not show on devices when released... Am I just supposed to trust that it will work via the App Store? 🫣
Posted Last updated
.
Post marked as solved
1 Replies
423 Views
Hi there, I am quite new to SwiftUI and got this problem: I want to implement TipKit in my app but as soon as I put DisplayFrequency and datastoreLocation into my code, I get this error message: I know that I somehow could look it up in the documentation but unfortunately I am still so new, that I don't understand it. Could someone help? Best Laurin
Posted
by rinuality.
Last updated
.
Post marked as solved
4 Replies
622 Views
I'm using UIKit and setting up TipKit with the suggested defaults try? Tips.configure([ .displayFrequency(.immediate), .datastoreLocation(.applicationDefault) ]) within func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { } Every time I swipe out of the app the tips start reappearing again - even the ones that have been invalidated. Has this happened for anyone else and does anyone else have a solution? Here's an example of one of my tips struct createTabTipHomePage: Tip { var title = styleTipTitle("Title") var message = styleTipMessage("Message") var asset: Image { Image(systemName: "plus.square") .resizable() } var rules: [Rule] { [ #Rule(TipActions.$homeTrandingScrolledToCreateTrigger) { $0 == true } ] } var options: [TipOption] { [Tip.MaxDisplayCount(1)] } func showAction() { TipActions.homeTrandingScrolledToCreateTrigger.toggle() } }
Posted Last updated
.
Post marked as solved
4 Replies
1.2k Views
Hello, I have a simple tip that im displaying, but want to change the tint color to something other than the default system blue tint. I tried different approaches that are common in changing image tint color but none seem to work. Is there a special call to achieve that? Note: I'm using UIKit to display the tip. Version 15.0 beta 8 (15A5229m) Thank you! example tip: struct FavoriteTip: Tip { var title: Text { Text("Favorite This Car") } var message: Text? { Text("Favorite this car to receive status updates and more!") } var image: Image? { Image(systemName: "heart.fill") } }
Posted
by kaiskarim.
Last updated
.
Post not yet marked as solved
1 Replies
497 Views
I'm facing multiple issues with TipKit. Let's start with this one. It's a NavigationSplitView, side bar has a toolbar button with a .popoverTip as well as the detail view. When launched (iPad landscape for example) only the sidebar tip shows, which is understandable because you wouldn't want two tips to show. However when the sidebar tip is .invalidate the second tip doesn't show. One needs to restart the app. How can I show the detail tip after the sidebar tip has been .invalidate? import SwiftUI import TipKit @main struct TestApp: App { let firstTip = FirstTip() let secondTip = SecondTip() var body: some Scene { WindowGroup { NavigationSplitView { List(1..<3) { i in NavigationLink("Row \(i)", value: i) } .toolbar { ToolbarItem { Button { firstTip.invalidate(reason: .actionPerformed) } label: { Image(systemName: "fireworks") } .popoverTip(firstTip, arrowEdge: .top) } } .navigationDestination(for: Int.self) { Text("Selected row \($0)") } .navigationTitle("Split View") } detail: { Text("Please select a row") .toolbar { ToolbarItem { Button { secondTip.invalidate(reason: .actionPerformed) } label: { Image(systemName: "trash") } .popoverTip(secondTip, arrowEdge: .top) } } } } } init() { try? Tips.resetDatastore() try? Tips.configure([ .datastoreLocation(.applicationDefault), .displayFrequency(.immediate) ]) } } struct FirstTip: Tip { var title: Text {Text("FirtTip")} var message: Text? {Text("FirtTip")} var image: Image? {Image(systemName: "trash")} } struct SecondTip: Tip { var title: Text {Text("SecondTip")} var message: Text? {Text("SecondTip")} var image: Image? {Image(systemName: "trash")} }
Posted
by Michaf.
Last updated
.
Post marked as solved
1 Replies
423 Views
When loading screen, I scan for tips: private lazy var scanAreaTipTask = Task { @MainActor in for await shouldDisplay in scanAreaTip.statusUpdates { if shouldDisplay == .available { onSetBeacon.send(.scanArea(scanAreaTip, .show)) } else { onSetBeacon.send(.scanArea(scanAreaTip, .hide)) scanAreaTipFinished = true } } } Task is called in ViewDidAppear of the UIViewController. First time I load this view controller, the scanAreaTip.statusUpdates always comes back as pending. If I quit this view controller and open it again, the scanAreaTip.statusUpdates will come back as available. Why does it always come back as pending on the first opening where it should come back as available? This is the tip that I am using. As shown, there aren't any rules or options used. Just a plain tip that should show straight away. public struct ScanAreaTip: Tip { public init() {} public var title: Text { Text("Scan area around you") .brandFont(style: .regular(.headline)) .foregroundStyle(Color.accentColor) } }
Posted
by jmgawe.
Last updated
.
Post marked as solved
2 Replies
471 Views
when using Tips with UIKit, presenting TipUIPopoverViewController disables all the buttons from the presenting screen. I assume this is the expected behaviour but is there a way to disable it? I would like the button that the tip is pointing to to be still enabled. Otherwise user has to tap on it twice which is not ideal. Method checking for tip's eligibility. private extension MenuViewController { func activateTips() { Task { @MainActor [weak self] in guard let self else { return } for await shouldDisplay in createMapTip.shouldDisplayUpdates { if shouldDisplay { let controller = TipUIPopoverViewController(createMapTip, sourceItem: createMapButton) { [weak self] action in if action.id == "LearnAboutMaps" { if self?.presentedViewController is TipUIPopoverViewController { self?.dismiss(animated: true) { self?.createMapTip.invalidate(reason: .actionPerformed) self?.viewModel.handle(.didTapLearnMoreAboutMaps) } } } } present(controller, animated: true) } else if presentedViewController is TipUIPopoverViewController { dismiss(animated: true) } } } } }
Posted
by jmgawe.
Last updated
.
Post marked as solved
2 Replies
1.1k Views
I want to show a tip on a button that will open a modal sheet on tap. The state if the sheet should be presented is held in an ObservableObject view model: @MainActor class ViewModel: ObservableObject { @Published var showSheet = false } struct ContentView: View { var tip = PopoverTip() @ObservedObject var viewModel = ViewModel() var body: some View { Button(action: { viewModel.showSheet.toggle() }, label: { Text("Button") }) .popoverTip(tip) .sheet(isPresented: $viewModel.showSheet) { Text("Sheet") } } } Here is the issue: When the tip is dismissed by tapping outside of it instead of tapping the close button, the tip will always reappear when tapping the button instead of showing the sheet. So effectively there is no way of triggering the actual button action, the tip will always pop up again and prevent the sheet from appearing. This is only an issue when using an ObservableObject to track the sheet state. When using a @State var showSheet: Bool inside the view itself instead, the sheet is shown as expected when tapping the button. It seems to be an issue of timing: Attempting to show the sheet somehow causes the view to be re-evaluated, which causes the tip to reappear (since it wasn't dismissed via close action). And since the tip is presented using modal presentation, the sheet can't be presented anymore. Is this a bug, or is there a simple way to avoid this issue?
Posted Last updated
.
Post not yet marked as solved
3 Replies
697 Views
Is it possible to disable the ability for the user to dismiss a tip? If not, is there a way to activate a tip again after it has been dismissed? Can the tip status be reset without deleting the datastore? I want to show a tip for password help after 3 failed login attempts but I never want it to be invalidated by the user.
Posted
by emeadeosu.
Last updated
.
Post not yet marked as solved
2 Replies
696 Views
Hello! I've encountered an issue when attempting to add multiple popoverTip modifiers in my SwiftUI code. Regardless of whether there's a specified rule or parameter, the tips begin to constantly appear and disappear. Is this a recognized issue? How can we sequentially display multiple tip popovers on complex views? Even when one tip is invalidated, the glitch persists. Should this be used only for views without any state updates? Here's a sample code that demonstrates the problem: import SwiftUI import TipKit @main struct testbedApp: App { var body: some Scene { WindowGroup { ContentView() } } init() { try? Tips.configure() } } struct PopoverTip1: Tip { var title: Text { Text("Test title 1").foregroundStyle(.indigo) } var message: Text? { Text("Test message 1") } } struct PopoverTip2: Tip { var title: Text { Text("Test title 2").foregroundStyle(.indigo) } var message: Text? { Text("Test message 2") } } struct ContentView: View { private let timer = Timer.publish(every: 0.001, on: .main, in: .common).autoconnect() @State private var counter = 1 var body: some View { VStack(spacing: 20) { Spacer() Text("Counter value: \(counter)").popoverTip(PopoverTip1()) Spacer() Text("Counter value multiplied by 2: \(counter * 2)") .foregroundStyle(.tertiary) .popoverTip(PopoverTip2()) Spacer() } .padding() .onReceive(timer) { _ in counter += 1 } } } #Preview { ContentView() }
Posted Last updated
.
Post marked as solved
6 Replies
1.1k Views
Hello! I've tested/implemented TipKit in SwiftUI and UIKit but it seems that the close, i.e. X, button doesn't work in UIKit but does in SwiftUI. Not sure if this is a bug or I have to do something different about it in UIKit. Testing with Xcode 15 Beta 8 Thanks!
Posted Last updated
.
Post not yet marked as solved
1 Replies
752 Views
Tips presented using the popoverTip view modifier can't be styled using other tip view modifiers (as of beta 8). For instance, the last two modifiers don't have any effect here: Image(systemName: "wand.and.stars") .popoverTip(tip) .tipBackground(.red) .tipCornerRadius(30) It will look like this: Whereas applying the same modifiers to a TipView changes its look: TipView(tip, arrowEdge: .bottom) .tipBackground(.red) .tipCornerRadius(30) Is this intended behavior? How can we change the appearance of popup tips?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.1k Views
I am about to start to develop some Tips for my app in Xcode 15 beta. Where can I find TipKit sample code to reference and where can I find documentation to help me out? I will be integrating these Tips in both SwiftUI and UIKit; how is the functionality the same/different?
Posted
by bmeikle.
Last updated
.
Post marked as solved
2 Replies
645 Views
I have created a custom TipViewStyle to have more control over the layout in the TipView. However, I've noticed that by doing so I lose the default "X" dismiss button. I do not see any way to access it from the Configuration. Is my only solution to add an Action to my Tip? Also, as an aside, has anyone figured out a way to add a shadow other than using the popoverTip? It seems to be clipped... struct Test: TipViewStyle { func makeBody(configuration: Configuration) -> some View { HStack() { configuration.image?.scaledToFit() VStack(alignment: .leading) { configuration.title configuration.message } } } }
Posted Last updated
.
Post not yet marked as solved
7 Replies
842 Views
Hi, I am using TipKit framework to show simple tips in my view controller & its working fine before update beta6. in iOS17 beta6 crash. if #available(iOS 17.0, *) { Task { try? await Tips.configure() } }
Posted Last updated
.
Post not yet marked as solved
5 Replies
838 Views
Hello! Based on the lack of forum posts, I think I'm one of the first people to really be diving into TipKit. :) I'm trying to use a tip to coax users toward a button in the toolbar of a NavigationView. The docs say to put the TipView "close to the content", but the best I can do for the NavigationView toolbar is to put it in one of the views inside the Navigation View itself. I'm using a TipView with an arrowEdge: .top parameter, which results in this: I'd love to be able to move the arrow tip under the plus button. Is that possible in this early beta stage? Do I need to restructure my view hierarchy somehow?
Posted Last updated
.
Post not yet marked as solved
3 Replies
2.9k Views
I liked the TipKit presentation -- nice and short and to the point, great introduction! All the code snippets were in SwiftUI. Will TipKit be available for regular UIKit / AppKit apps as well, or is it restricted to only being used within SwiftUI apps? thanks
Posted Last updated
.