I'm trying to get Bluetooth Mesh working on my iPhone 12 mini.
So i installed nRFMeshProvision 3.2.0 cocoapod. I've managed to successfully run the demo application that comes with the pod. Everything works fine.
Now when i try to rewrite the application to use SwiftUI instead of storyboards i'm getting "CoreBluetooth XPC connection invalid" When trying to connect to a node.
Ive been messing around and i found that the error appears when creating a new bearer.
let bearer = PBGattBearer(target: self.discoveredPeripherals[index].peripheral)
inside this PBGattBearer class in it's constructor
centralManager = CBCentralManager()
Is called and this produces the XPC error.
Why is this? I've been reading that multiple centralManagers is fine and ive stopped scanning before creating the bearer.
Any advice or help is appreciated!