Commit a704111d authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

vcard: fix photo type

Change-Id: Ie838c760e393577eb1453228acb3868298735512
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 6d3a34a4
......@@ -27,8 +27,8 @@ import Contacts
enum VCardFields: String {
case begin = "BEGIN:VCARD"
case uid = "UID:"
case photoJPEG = "PHOTO;TYPE=JPEG;ENCODING=BASE64:"
case photoPNG = "PHOTO;TYPE=PNG;ENCODING=BASE64:"
case photoJPEG = "PHOTO;ENCODING=BASE64;TYPE=JPEG:"
case photoPNG = "PHOTO;ENCODING=BASE64;TYPE=PNG:"
case end = "END:VCARD"
case name = "N:"
case fullName = "FN:"
......@@ -71,7 +71,7 @@ extension CNContactVCardSerialization {
if let compressionSize = compressedSize, image.count > compressionSize {
// compress image before sending vCard
guard let compressedImage = UIImage(data: image)?
.convertToData(ofMaxSize: compressionSize)else {
.convertToData(ofMaxSize: compressionSize) else {
return vCardString.data(using: .utf8)!
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment