You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! Great library, the only thing I haven't been able to figure out is why the generated contact card isn't differentiating between HOME/WORK email types and CELL/WORK phone types. An example of my code is below so if I'm doing something wrong it can be pointed out.
if ($request->has('phone') and $prefPhone) {
$phone = $request->request->get('phone');
$vcard->addPhoneNumber($phone, 'PREF;CELL');
$prefPhone = false;
}
if ($request->has('workPhone')) {
$workPhone = $request->request->get('workPhone');
if ($prefPhone) {
$vcard->addPhoneNumber($workPhone, 'PREF;WORK');
}
else {
$vcard->addPhoneNumber($workPhone, 'WORK');
}
}
if ($request->has('email')) {
$email = $request->request->get('email');
$vcard->addEmail($email, 'PREF;HOME');
$prefEmail = false;
}
if ($request->has('workEmail')) {
$workEmail = $request->request->get('workEmail');
if ($prefEmail) {
$vcard->addEmail($workEmail, 'PREF;WORK');
}
else {
$vcard->addEmail($workEmail, 'WORK');
}
}
The strangest part is that when I inspect the resulting .vcf in TextEdit I can see the correct encodings, for example:
TEL;PREF;CELL:123-456-7891
TEL;WORK:321-654-9872
However, when I try to view the contact file on my Mac and iPhone, the contact card contains both emails + phone numbers, but they're both just labeled as "email" and "phone" respectively. Is this another ridiculous limitation on Apple devices/has anyone else run into this issue or is it a problem on the part of the library somehow?
Thanks!
The text was updated successfully, but these errors were encountered:
The current released vCard library supports vCard version 3. @tpinne the URL shows the scheme for version 4.
That is why there is no TYPE= (I guess)
If you look into the current branches, you will see a v2.0.0 which supports vCard version 4.
Currently still WIP, would be nice if more people could help finalizing it 🙏
Hey! Great library, the only thing I haven't been able to figure out is why the generated contact card isn't differentiating between HOME/WORK email types and CELL/WORK phone types. An example of my code is below so if I'm doing something wrong it can be pointed out.
The strangest part is that when I inspect the resulting .vcf in TextEdit I can see the correct encodings, for example:
TEL;PREF;CELL:123-456-7891
TEL;WORK:321-654-9872
However, when I try to view the contact file on my Mac and iPhone, the contact card contains both emails + phone numbers, but they're both just labeled as "email" and "phone" respectively. Is this another ridiculous limitation on Apple devices/has anyone else run into this issue or is it a problem on the part of the library somehow?
Thanks!
The text was updated successfully, but these errors were encountered: