Fetch Contact Image - SwiftUI
问题 I'm trying to fetch the image property of a given contact . Here's what I got: Model struct Contact: Identifiable { let contact: CNContact var id: String { contact.identifier } var image: Data? { contact.imageData } var givenName: String { contact.givenName } } static func fetch(_ completion: @escaping(Result<[Contact], Error>) -> Void) { let containerID = CNContactStore().defaultContainerIdentifier let predicate = CNContact.predicateForContactsInContainer(withIdentifier: containerID()) let