addressbook

how to display iphone addressbook in indexed table view

半世苍凉 提交于 2019-12-12 00:37:03
问题 i am writing an iphone application where i am accessing contacts from AddressBook. I've successfully displayed the contacts using ABPeoplePickerNavigationController. Now now i want to do is to display contacts in alphabetically separate sections, and with alphabetic index on right side just like in this image. http://www.isoaxis.com/temp/peoplePicker.png How should i do that??? Best regards 回答1: I believe ABPeoplePickerNavigationController has this alphabet index by default. You probably just

How can I get the values I set for custom properties in AddressBook to persist?

核能气质少年 提交于 2019-12-11 16:07:08
问题 I have created a custom property in AddressBook named "Qref". I can check it's there using [ABPerson properties] , and it's always there for any test app I write. By the way, you can't remove custom properties, because [ABPerson removeProperties] hasn't been implemented. Let me know if it ever is, because I need to remove one whose name I mistyped. I set a property value with this code. ABPerson *p = <person chosen from a PeoplePicker>; NSError *e; if (![p setValue: aString forProperty:@"Qref

Iphone addressbook

五迷三道 提交于 2019-12-11 14:50:02
问题 I have used addressbook framework in my application.I want to allow user to edit and delete cotacts from my application.Which notification get generated when user edit the contact,also how to use delete functionality of addressbook framework. 回答1: Use addressBook call back. void ABAddressBookRegisterExternalChangeCallback ( ABAddressBookRef addressBook, ABExternalChangeCallback callback, void *context ); My Sample - Register (After creating addressBookRef)

storing addressbook contacts into a nsdictionary

会有一股神秘感。 提交于 2019-12-11 14:17:51
问题 I'm still trying to wrap my head around using NSDictionaries, and have come into a situation where I believe I need to use one. essentially, I would like to store all the phone numbers associated with each contact into a dictionary. so far I have this: ABAddressBookRef addressBook = ABAddressBookCreate(); NSArray *thePeople = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook); for (id person in thePeople) { ABMultiValueRef phones =(NSString*)ABRecordCopyValue(person,

Unable to add contacts into specific group in iphone using ABGroupAddMember

百般思念 提交于 2019-12-11 14:04:41
问题 I am trying to add selected contacts into specific group but contacts cant added in group. I want to create new group and add contacts into that group. but after creating group in that group unable to add contacts.here is my code for create new group and add contacts into group: addressBook = ABAddressBookCreateWithOptions(nil, &err); group = ABGroupCreate(); ABRecordSetValue(group, kABGroupNameProperty, txtGroupNameText.text, &err); ABAddressBookAddRecord(addressBook, group, &err);

How to create a contact in the “local” addressbook?

南楼画角 提交于 2019-12-11 10:01:01
问题 I am wanting to create a contact programmatically into the "local" addressbook (so that it doesn't try to synch, which causes some compatibility issues with Exchange). If a local addressbook already exists, I can find it using ABAddressBookCopyArrayOfAllSources to get all the sources in the Address Book, then look for the ABRecordRef with a sourceTypeRef of "kABSourceTypeLocal"- if I then pass that recordRef to ABPersonCreateInSource, I can add a record to the local directory. Does anyone

How to deal with addressbook changes

本小妞迷上赌 提交于 2019-12-11 09:45:02
问题 In our app we keep references to contacts in the address book. What is the best way to make sure that we can deal with updates (both from our app to the address book as well as from the address book to our app). We want to make sure we can handle spelling mistakes, address phone and email changes, synchronization, duplication, 'interesting' use of first last and company name etc. Currently we check first on addressbook id. Only if it changes, we update our information/try to find back the

OS X Safari automatically convert selection to contact

血红的双手。 提交于 2019-12-11 09:27:58
问题 I am relatively new to OS X. Is there a downloadable app or service which will allow me to select some text (address, phone number) from a web page or other text and automatically create a new contact in the address book? Thanks. 回答1: Search on Data Detectors - in Mail these are automatically enabled, but in other apps they can be contextual (i.e. you need to select the text first and right-click) or require activation (again via the context menu) first. If they require activation, you can

Trying to read Windows 7 Contacts doesn't work

吃可爱长大的小学妹 提交于 2019-12-11 07:55:32
问题 I based my code on http://msdn.microsoft.com/en-us/library/ms735866.aspx which is quite bugged, after some adaptation of function CreateNewContact() I tried the following. I don't have errors anymore but nothing is happening : IClassFactory* pFactory = NULL; HRESULT rc; rc = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); if (rc == S_OK) rc = CoGetClassObject(CLSID_Contact,CLSCTX_INPROC_SERVER,NULL,IID_IClassFactory, (void **) &pFactory); if (rc == S_OK) rc = CreateNewContact( pFactory); if

How do I set an ABPeoplePickerNavigationController's prompt?

狂风中的少年 提交于 2019-12-10 20:31:19
问题 This is the code I'm using to call the people picker, but the prompt label text doesn't change: ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; picker.displayedProperties = [NSArray arrayWithObjects: [NSNumber numberWithInt:kABPersonEmailProperty], nil]; picker.navigationItem.prompt = @"Choose a contact to..."; [self presentModalViewController:picker animated:YES]; 回答1: You can change the title with: picker