In WWDC 2019 video 721, the basis of the main example starts like this:
let trickNamePublisher = NotificationCenter.default.publisher(for: .newTrickDownloaded)
.map { notification in
return notification.userInfo?["data"] as! Data
}
That seems inadvisable. What happens if there's no userInfo, or it contains no "data" key, or it isn't a Data? We'll force-unwrap nil and crash. What's the best practice here?