【问题标题】:How can i Open .vcf file in my view controller in objective c我如何在目标 c 的视图控制器中打开 .vcf 文件
【发布时间】:2016-11-18 09:35:51
【问题描述】:

我有来自网络服务的 .Vcf 文件(Url)。我想在我的视图控制器中打开它。

任何人都可以帮助我。

谢谢。

【问题讨论】:

标签: ios objective-c vcf-vcard


【解决方案1】:

这就是解决方案

NSData *data=[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",[self.totalData valueForKey:@"file"]]]];
      NSArray *contactList = [NSArray arrayWithArray:[CNContactVCardSerialization contactsWithData:data error:nil]];
      CNContact *contact;
           contact=[contactList objectAtIndex:0];
      NSLog(@"%@",contact.givenName);
      NSLog(@"%@",contact.familyName);

【讨论】:

    猜你喜欢
    • 2017-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多