Answer by Rob on StackOverflow:
The problem would appear to be using “Recording mode” of “Deferred” when profiling on a physical iOS device, regardless of which Instruments template you choose. If you change the recording mode to “Capture last n seconds” (or, where available, “Immediate”), this problem does not manifest itself.
This problem jumps out at you when using “Animation hitches” template because that template does not accept a recording mode of “Immediate” and defaults to “Deferred” mode. But if you pick a different template, and manually change its recording mode to “Deferred”, that will also manifest the same problem.
Selecting "Capture last n seconds" instead of "Deferred" solves the issue.
I've submitted a bug report: "Deferred" mode should not be selected in the Animation Hitches template if it's not supported.
Post
Replies
Boosts
Views
Activity
I'm getting the same lag and warnings when opening any TextField, both when running from Xcode and from the device.
This is happening across multiple projects.
In one project, it also seems to affect all instances of an unrelated UIViewRepresentable, which gets an unexpected layout change every time (and only when) these warnings pop up.
Same issue here, after removing a SwiftData relationship.
Thanks to YodagamaHeshan who answered on StackOverflow:
You need to set the selected value using the given configuration in timeLine().
func timeline(for configuration: TestIntent, in context: Context) async -> Timeline<TestEntry> {
let testBool = configuration.bool
let testStr = configuration.str
return Timeline(entries: [
TestEntry(
date: .now,
bool: testBool,
str: testStr,
enum1: configuration.enum1 //<= here
)
], policy: .atEnd)
}