Swift loadItem closure not running
问题 I am writing a share extension, but my closure that would capture and save the shared attachment is not running. How can I find out why? The switch branch executes, the attachment is there. There is no error message, it just never runs. if let contents = content.attachments as? [NSItemProvider] { for attachment in contents { let fType = attachment.registeredTypeIdentifiers[0] if attachment.hasItemConformingToTypeIdentifier(fType) { switch fType { case kUTTypeImage as String as String: do {