Thank you, that seems to have fixed the issue.
Post
Replies
Boosts
Views
Activity
Glad to read others are having the same issue, got scared for a but. Also using SwiftData. If you run your App in instrument it's fine.
I'm also experiencing issues. Furthermore the name of the container in the In the storage management of "setup", iCloud are not the name of the apps but the last component of the storage container.
Same issue. Shocking, really. Beyond comprehension...
I've found a way.
//
// TestApp.swift
// Test
//
// Created by Michael Fuhrmann on 19/10/2023.
//
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)
Task { @MainActor in
try await Task.sleep(for: .seconds(0.5))
await SecondTip.simpleRuleTipEnabled.donate()
}
} 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 {
static let simpleRuleTipEnabled = Event(id: "simpleRuleTipEnabled")
var title: Text {Text("SecondTip")}
var message: Text? {Text("SecondTip")}
var image: Image? {Image(systemName: "trash")}
var rules: [Rule] {
#Rule(Self.simpleRuleTipEnabled) { $0.donations.count > 0 }
}
}```
Replacing Label("New", systemImage: "plus.circle.fill") with Image(systemName: "plus.circle.fill") fixed it for me.