Post

Replies

Boosts

Views

Activity

Is 'List' unsupported in Widgets?
The following code, in an independent project works fine: struct ContentView: View {     var body: some View {         List {             Text("Hello, world!")         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } } The following code in a Widget Extension results in an error being displayed in the SwiftUI view (it builds fine): struct ContentView: View {     var body: some View {         List {             Text("Hello, World!")         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()             .previewContext(WidgetPreviewContext(family: .systemMedium))     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView().previewContext(WidgetPreviewContext(family: .systemMedium))     } }
0
0
633
Aug ’20
Understanding System Trace's Main Thread 'Blocked'
We've lots and lots going on at startup, but in particular we've some items which can for a very short period of time block the main thread, causing a UITableView stutter on scroll.https://imgur.com/a/RWDvFJzUsing the 'System Trace' tool, we can clearly see on the Main Thread some 'blocked' states. However, I'm finding it difficult to pinpoint down in code where this happens.If I find the 'mach_msg_trap' associated with a particular blocking item, the Stack on the right has a basic stack (see: https://imgur.com/a/tNnXQvh), but double clicking on main brings a function which couldn't possibly be the cause of a blocker (as it's a ViewModel which in this case doesn't get initialized in this flow).Is it possible to fixture out, even what thread is blocking, so I can find that thread at the time, and look at it's call stack?
2
0
7.1k
Aug ’18