NotificationCenter.default.addObserver(self, selector: Selector((\"uploaded\")), name: NSNotification.Name(rawValue: \"uploaded\"), object: nil)
I was
NotificationCenter.default.addObserver(self, selector: #selector(ViewController.update), name: NSNotification.Name(rawValue: "uploaded"), object: nil) func update() { // do what you want }
please note that "ViewController" is the class name where your function is