0

Hi i am creating the contact object and assigning the data like name ,phone number . image etc.

This data i am transferring to the other device using airdrop.

The data goes and saves to the other device except image.

Below is the code i am using for saving the data toCNMutableContact.

let contact = CNMutableContact()

contact.givenName = “John”

let image = UIImage(named: “school”)
let imgData = UIImagePNGRepresentation(image!)

contact.imageData = imgData

Pruthviraj Karur S asked