How do I add NotificationCenter.default.addObserve in SwiftUI?
When I tried adding observer I get below error
Argument of \'#sele
This worked for me
let NC = NotificationCenter.default self.NC.addObserver(forName: .NEVPNStatusDidChange, object: nil, queue: nil, using: self.VPNDidChangeStatus) func VPNDidChangeStatus(_ notification: Notification) { }