After migrating to Swift 3, I get an error when I try and do:
self.publicDB.save(listRecord, completionHandler: { (record, error) -> Void in
if let saveError = error {
NSLog("There was an error saving the record: %@", saveError)
}...
Can someone tell me why this is and what I can do produce an output with relative ease?
The error is NSLog unavailable: variadic function unavailable
.
The problem, despite the "variadic" red herring, is that we no longer get automatic bridging to an Objective-C type; you have to cross the bridge explicitly, yourself. Write saveError as NSError
to get an Objective-C style object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With