Post

Replies

Boosts

Views

Activity

Canvas crashes with Task code
Good day! It seems to be a bug in Xcode that preview can be showed correctly with async code wrapped in Task, for ex: struct MyView: View { var onTapped: (() async -> Bool)? var body: some View { Button {             Task {                 guard await onTapped?() ?? true else { return }             } .....         } label: { Text("Tap me")         } } }      Crash log
2
0
1k
Apr ’22