coffeeTracker.updateDisplay() // If an error is encountered, use NCUpdateResult.Failed // If there's no update required, use NCUpdateResult.NoData // If there's an update, use NCUpdateResult.NewData completionHandler(NCUpdateResult.NewData) }
NSItemProvider? if let items = extensionContext?.inputItems { if let item = items.first as? NSExtensionItem { if let attachment = item.attachments?.first as? NSItemProvider { itemProvider = attachment } } } }