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
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
by
Post marked as Apple Recommended
1.6k Views
I want to try the new TipKit features but when I import it from project, Xcode told me that No such module 'TipKit' and I also try the following code to create a tip directly but it doesn't work and Xcode shows Cannot find type 'Tip'. What can I do to use the new feature? // MARK: Tips define here. struct bookmarkTip: Tip { }
Posted
by
Post not yet marked as solved
9 Replies
3.6k Views
I am trying to use tip kit in my demo app but I am unable to access its api's. When I try to call TipsCenter.shared.configure() I am getting Cannot find 'TipsCenter' in scope. I am using the latest Xcode beta and trying in swiftUI. Any solutions?
Posted
by
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
Post not yet marked as solved
1 Replies
811 Views
Hi folks, I'm trying to implement TipKits to understand more better but I'm facing an error while trying to use @Parameter macro. Here is the sample code that I've tried as showed on instruction videos below struct FavoriteLandmarkTip: Tip { @Parameter static var isLoggedIn: Bool = false var title: Text { Text("Save as Favourite") } var message: Text? { Text("Your favorite landmarks always appear at the top of the list.") } var asset: Image? { Image(systemName: "star") } var actions: [Action] { [ Tip.Action( id: "learn-more", title: "Learn More" ), ] } } But I'm getting this error for isLoggedIn property External macro implementation type 'TipKitMacros.ParameterMacro' could not be found for macro 'Parameter(isTransient:customID:)'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library' Could you help me to solve this problem ?
Posted
by
Post not yet marked as solved
5 Replies
839 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
by
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
by
Post not yet marked as solved
5 Replies
2.1k Views
Hi folks, there's currently a known issue in TipKit due to which it won't show popover tips on buttons that are inside a SwiftUI ToolbarItem. For example, if you try this code, the popover tip will not appear: ToolbarItem { Button(action: {...}) { Label("Tap here", systemImage: "gear") } .popoverTip(sampleTip) } There's an easy workaround for this issue. Just apply a style to the button. It can be any style. Some examples are bordered, borderless, plain and borderedProminent. Here's a fixed version of the above code: ToolbarItem { Button(action: {...}) { Label("Tap here", systemImage: "gear") } .buttonStyle(.plain) // Adding this line fixes the issue. .popoverTip(sampleTip) } Hope this helps anyone running into this issue.
Posted
by
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 } } } }
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
by
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
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
by
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? 🫣
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
by
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
by
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
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
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