【发布时间】:2014-07-21 10:15:21
【问题描述】:
我正在使用 ABNewPersonViewController 添加或编辑地址人。但是,当我点击完成按钮时,总是会出现一些警告。记录数据成功保存到系统通讯录,但还是看不懂警告。
Jul 21 17:58:41 Jerrys-iPhone YouxinClient[2052] <Notice>: (Warn ) [ABLog]: <ABSource.c ABAddressBookCopyDefaultSource:111> Actual default source doesn't exist
Jul 21 17:58:41 Jerrys-iPhone YouxinClient[2052] <Notice>: (Warn ) [ABLog]: <ABSource.c ABAddressBookCopyDefaultSource:118> Failed to fallback to local source as it is not a valid default source
这样的代码:
__block ABAddressBookRef pAddressbook = [PublicFunc createAddressBookInstance];
ABRecordRef person = ABAddressBookGetPersonWithRecordID(pAddressbook, self.oneContact._addressPerson.nAddressId);
ABNewPersonViewController *pPicker = [[ABNewPersonViewController alloc] init];
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:pPicker];
pPicker.newPersonViewDelegate = self;
pPicker.displayedPerson = person;
[self presentViewController:nav animated:YES completion:^(void){
FreeMemory_CFRelease(pAddressbook);
}];
[pPicker release]; pPicker = nil;
[nav release]; nav = nil;
【问题讨论】:
标签: ios objective-c abaddressbook