iOS无法呈现VCF文件 [英] iOS failing to render vcf file

查看:278
本文介绍了iOS无法呈现VCF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用twilio共享我的用户的联系信息.我已经做了6个月了,没问题.

I use twilio to share contact information of my users. I've been doing this for 6 months with no problems.

最近,我开始收到有关联系卡未通过的错误报告. iOS以未知附件的形式接收了它的文件名,例如'text_0.x-vcard'[请参见屏幕截图]

Recently, I started receiving bug reports that the contact card isn't coming through. iOS is receiving it as an unknown attachment with a file name such as 'text_0.x-vcard' [see screenshot]

我无法在我的设备上重现此内容-我已经收到使用iPhone 7,iPhone 6和iPhone 5的用户的报告-不一致.操作系统也没有一致性. vcf文件是有效的,并且适用于90%的用户.

I'm unable to reproduce this on my device - I've received reports of this from users with an iPhone 7, iPhone 6, and iPhone 5 - nothing consistent. No consistency in OS either. The vcf file is valid, and it works for 90% of users.

有什么想法吗?这是一个vcf文件的示例-在我的手机上可以使用,在其他设备之一上不能使用.

Any ideas? Here is an example of a vcf file - works on my phone, doesn't work on one of the other devices.

BEGIN:VCARD
VERSION:3.0
N:Doe;John;;;
FN:John Doe
ORG:Example.com Inc.;
TITLE:Imaginary test person
EMAIL;type=INTERNET;type=WORK;type=pref:johnDoe@example.org
TEL;type=WORK;type=pref:+1 617 555 1212
TEL;type=WORK:+1 (617) 555-1234
TEL;type=CELL:+1 781 555 1212
TEL;type=HOME:+1 202 555 1212
item1.ADR;type=WORK:;;2 Enterprise Avenue;Worktown;NY;01111;USA
item1.X-ABADR:us
item2.ADR;type=HOME;type=pref:;;3 Acacia Avenue;Hoemtown;MA;02222;USA
item2.X-ABADR:us
NOTE:John Doe has a long and varied history\, being documented on more police files that anyone else. Reports of his death are alas numerous.
item3.URL;type=pref:http\://www.example/com/doe
item3.X-ABLabel:_$!<HomePage>!$_
item4.URL:http\://www.example.com/Joe/foaf.df
item4.X-ABLabel:FOAF
item5.X-ABRELATEDNAMES;type=pref:Jane Doe
item5.X-ABLabel:_$!<Friend>!$_
CATEGORIES:Work,Test group
X-ABUID:5AD380FD-B2DE-4261-BA99-DE1D1DB52FBE\:ABPerson
END:VCARD

推荐答案

Steph, 我是Stack Exchange的新手,所以我不知道该怎么发送.您在上面显示了您的Twilio号码之一.
我看到了类似的问题,并且我相信所有问题都与您的内容类型有关.尝试

Steph, I'm new to Stack Exchange, so I don't know how else to send this. You show one of your Twilio numbers above.
I am seeing similar issues, and I believe it is all related to your content type. Try a

curl --head <your vcard web address>

我唯一为我工作的是它返回时

The only time I've had it work for me is when the it returned

Content-Type: text/x-vcard; charset=utf-8; name="fileName.vcf"

我不知道此链接将持续多久,但尝试发送此vcard VCF文件(从http地址发送),在适用于iOS 10.3.3的Twilio上对我有效

I don't know how long this link will last but try sending this vcard VCF File (Send from http address), it works for me on Twilio w/ iOS 10.3.3

我认为您对此事的权利与安全有关;您为什么要像"text/x-vcard"文件一样执行"text/html"文件. 我认为内部标头修饰符不起作用.

I think your right about it being related to security; why would you want a 'text/html' file being being executed like a 'text/x-vcard' file. I don't think internal header modifiers will work, let me know.

这篇关于iOS无法呈现VCF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆