Having a property inside of an ObservableObject with a type of a closure with a typed throws will crash the app on the initialization of the observable object on iOS 17. Here is an example:
struct ContentView: View {
@StateObject var myDataSource = MyDataSource()
var body: some View {
EmptyView()
}
}
enum MyError: Error {
case error
}
class MyDataSource: ObservableObject {
let signUp: (Int) throws(MyError) -> Void = { _ in }
}
If you run this code on iOS 17, the app will crash. The Radar for this issue is FB16399987.