这是我获取设备联系人的代码,我想将这些联系人移动并复制到我的 Gmail 帐户。
CNContactStore *contactStore = [[CNContactStore alloc] init];
NSArray *keys = [[NSArray alloc]initWithObjects:CNContactJobTitleKey,CNContactNoteKey,CNContactBirthdayKey, CNContactThumbnailImageDataKey, CNContactPhoneNumbersKey,CNContactEmailAddressesKey,CNContactTypeKey, CNContactViewController.descriptorForRequiredKeys,CNContainerIdentifierKey, nil];
CNContactFetchRequest *request = [[CNContactFetchRequest alloc] initWithKeysToFetch:keys];
request.predicate = nil;
[contactStore enumerateContactsWithFetchRequest:request error:nil usingBlock:^(CNContact* __nonnull contact, BOOL* __nonnull stop){
}];