Contact image doesn't send when contact saved by CNContact
<p>I've written a code that saves a contact with image. I used CNContact class to do it. It saves the contact successfully.</p>

<p>The contact shows correctly with thumbnail in iOS's default Contact app. But my problem is that, when I share that contact via SMS or Email using iOS's default Contact app, the image doesn't add up in vCard.</p>

<p>Can anybody guide to me to what I've done wrong?</p>

<p>The following is the method that I used to save contact. It is in Swift.</p>

<pre><code>func addContact(withData: ContactModel, andPicture picture: NSData?) -&gt; Bool {
    if(checkForPermission() != true) {
        print("No permission")
        return false
    }

    let contact = convertToCNMutableContact(withData)
    contact.imageData = picture
    let saveRequest = CNSaveRequest()
    saveRequest.addContact(contact, toContainerWithIdentifier: nil)
    do {
        try contactStore.executeSaveRequest(saveRequest)
        return true
    } catch  {
        print("Couldn't save contact")
        return false
    }
}
</code></pre>