CoreBluetooth @ Swift UI

I have an app that uses CoreBluetooth to connect to and read/write data via Storyboards. It works great.

I'm trying to port over to swiftUI and, while the code compiles, it doesn't do anything. I have a feeling I'm not setting up the CentralManager correctly or my class that contains all the Bluetooth stuff isn't being initialized.

Any suggestions?

In the old storyboard based code I had the following lines to kick everything off.

   var centralManager: CBCentralManager?
....
centralManager = CBCentralManager(delegate: self, queue: nil)

What is the equivalent in SwiftUI?

Used like this :

import Foundation
import CoreBluetooth

class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate {

    var myCentral: CBCentralManager!

    @Published var peripherals = [Peripheral]()
    

    override init() {

        super.init()

        myCentral = CBCentralManager(delegate: self, queue: nil)

        myCentral.delegate = self

    }

CoreBluetooth @ Swift UI
 
 
Q