【发布时间】:2016-03-11 11:11:17
【问题描述】:
我正在尝试从网络数组中添加新的联系人号码,但设备中没有输入数据
CNLabeledValue *homePhone = [CNLabeledValue labeledValueWithLabel:CNLabelPhoneNumberMobile value:[CNPhoneNumber phoneNumberWithStringValue:[NSString stringWithFormat:@"%@",[[contactDict valueForKey:@"Mobile"]objectAtIndex:i]]]];
contact.phoneNumbers = @[homePhone];
CNSaveRequest *request = [[CNSaveRequest alloc] init];
[request addContact:contact toContainerWithIdentifier:nil];
【问题讨论】:
-
尝试 NSLOG [NSString stringWithFormat:@"%@",[[contactDict valueForKey:@"Mobile"]objectAtIndex:i]
标签: ios objective-c cncontact cncontactstore