草庐IT

CNContactFetchRequest

全部标签

ios - 无法使用联系人框架创建联系人名片

我正在使用此代码将联系人从ios电话簿导出到.vcf文件。我已将此代码用于该任务。但是vcardString总是返回nil。请帮我解决这个问题。NSMutableArray*contacts=[NSMutableArrayalloc]init];CNContactStore*store=[[CNContactStorealloc]init];[storerequestAccessForEntityType:CNEntityTypeContactscompletionHandler:^(BOOLgranted,NSError*_Nullableerror){if(!granted){di