iPhone: how to get safari to recognize a vcard?

前端 未结 2 1139
梦毁少年i
梦毁少年i 2020-12-05 08:30

I\'m trying to create a QR code so that iPhone users can import my address book information. I\'m doing this by:

  • putting a VCF (vcard) file on my web server
2条回答
  •  青春惊慌失措
    2020-12-05 09:05

    I have just published an alternative solution on my blog which describes how to attach the contact file as an attachment to a calendar file which is handled by mobile safari from iOS5 onwards.

    http://mobicontact.info/iphone/download-contact-from-web-page/

    The blog shows complete solution including source code and images of the whole process and as such is a lot easier to read than what I can put here on Stack Overflow. The main point to note is that Apple use :

    ATTACH;VALUE=BINARY;ENCODING=BASE64;FMTTYPE=text/directory;
    X-APPLE-FILENAME=iPhone Contact.vcf:
    QkVHSU46VkNBUkQNClZFUlNJT046M…etc… [base64 encoded VCARD]
    

    for embedded VCARD in VCALENDAR files. Create a VCALENDAR file and then base64 encode your VCARD within it - code snippet below (full details on my blog)

    
    

提交回复
热议问题