我正在手动将电子邮件 ID 添加到 ABRecordRef 中,这会返回异常。查看代码
ABRecordRef person=ABPersonCreate();
NSString *email=@"adsasdads@sadad.com";
ABRecordSetValue(person,kABPersonEmailProperty,(__bridge CFTypeRef)email,NULL);
CFRelease(person);
我正在手动将电子邮件 ID 添加到 ABRecordRef 中,这会返回异常。查看代码
ABRecordRef person=ABPersonCreate();
NSString *email=@"adsasdads@sadad.com";
ABRecordSetValue(person,kABPersonEmailProperty,(__bridge CFTypeRef)email,NULL);
CFRelease(person);
试试这个.....
ABMutableMultiValueRef email = ABMultiValueCreateMutable(kABMultiStringPropertyType);
ABMultiValueAddValueAndLabel(email,(__bridge CFTypeRef)emailaddress,kABWorkLabel, NULL);
ABRecordSetValue(self.persons,kABPersonEmailProperty,email, NULL);
CFBridgingRelease(email);