Closed Danieltech99 closed 1 year ago
Swift/iOS is not currently my area of expertise, but wondering if this might be useful:
https://developer.apple.com/documentation/uikit/uiimage/1624096-pngdata
I've made a PR #102 that will fix this issue. Could please test if this solves your issue?
Shipped in latest release!
The code in this file assumes that the contact image is always a png and adds that in the metadata. Looking at logs, I think this can return other types (I believe I see some jpgs marked as pngs in my own use).
It would likely be advisable to add code to detect the image type and add the appropriate prefix.
https://github.com/capacitor-community/contacts/blob/975c43dc135fa0d97ce0ce138c9502f21bb7d378/ios/Plugin/ContactPayload.swift#L156