在我的 iOS 应用程序中,我创建了自己的联系表单,该表单附加了我的应用程序的唯一标识符。我想将通讯录中的联系人更新为 sql "update" 语句。
在 iOS 中,我只看到 ABAddressBookAddRecord 和 ABAddressBookRemoveRecord 方法。我该怎么做 UpdateContact?
在我的 iOS 应用程序中,我创建了自己的联系表单,该表单附加了我的应用程序的唯一标识符。我想将通讯录中的联系人更新为 sql "update" 语句。
在 iOS 中,我只看到 ABAddressBookAddRecord 和 ABAddressBookRemoveRecord 方法。我该怎么做 UpdateContact?
In our app, we let the user decide, whether to add a new contact or merge the new data into an existing one. We did it like that: (assuming you use a navigationViewController)
ABUnknownPersonViewController *view = [[ABUnknownPersonViewController alloc] init];
view.unknownPersonViewDelegate = self;
view.displayedPerson = <YOUR-ABRecordRef-HERE>;
view.allowsAddingToAddressBook = YES;
view.allowsActions = YES;
[self.navigationController pushViewController:view animated:YES];
The user then sees the record in single view (just your "new" data) and has buttons to import or merge to existing contact.