Closed dcilia closed 23 hours ago
Hi, I just tested on Xcode 16.1 beta (16B5001e) and didn't get a crash. Do you mind sharing how your CentralManager
is constructed and how you're calling scanForPeripherals
?
Hi, I'm using 2.0.0
of the package. I made a quick project to reproduce. Attaching it here.
AsyncBT.zip
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
.task {
let stream = try? await CentralManager().scanForPeripherals(withServices: nil)
}
}
}
Sorry forgot to mention I can reproduce using Mac Catalyst destination
Thanks for posting the sample project. I was able to reproduce the crash with that project, though like you said, only when using the Mac Catalyst destination. That said, it seems like it's not a bug with AsyncBluetooth
specifically. It's also reproducible if you replace the task modifier with:
.task {
try? await withCheckedThrowingContinuation { continuation in
continuation.resume()
}
}
I'll keep an eye out, but I suspect there's nothing we can do here.
It's been resolved by Apple for a future Xcode release.
Hi, I am getting a crash in Xcode 16.1 beta (latest build) when calling
scanForPeripherals...
the function does not crash when called on Xcode 15.