addressbook

iPhone Address Book custom property

╄→尐↘猪︶ㄣ 提交于 2019-12-22 11:23:40
问题 I am developing an application which is similar to native contact book app of iphone. I want to add additional property/field in native iphone address book database. e.g. network carrier of each contact (AT&T). How to access the database of native address book from our app? Is that possible to do? 回答1: You cannot add custom fields. You can add data into the Notes field, but not add any custom fields into the AddressBook Person class. You can extend the AddressBook but you will need to save

ABAddressBookRegisterExternalChangeCallback works, but data is stale

狂风中的少年 提交于 2019-12-21 10:44:09
问题 My app registers the callback once: notificationAddressBook = ABAddressBookCreate(); ABAddressBookRegisterExternalChangeCallback(notificationAddressBook, MyAddressBookExternalChangeCallback, self); Then in my callback: void MyAddressBookExternalChangeCallback (ABAddressBookRef notifyAddressBook,CFDictionaryRef info,void *context) { NSLog(@"in MyAddressBook External Change Callback"); ABAddressBookRevert(notifyAddressBook); CFArrayRef peopleRefs = ABAddressBookCopyArrayOfAllPeopleInSource

need help : google, yahoo, hotmail contacts api [closed]

谁说胖子不能爱 提交于 2019-12-21 04:56:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . i want to import addressbook contacts from Gmail, Windows Live, and Yahoo just like Facebook. In facebook, when i click on Windows live importer, a popup comes with a login page of Windows live. how can i do that? can anyone suggest me a tutorial or reading material to learn about that? 回答1: For Gmail, Google

How to add a “Custom Label” to iOS AddressBook programmatically?

允我心安 提交于 2019-12-21 02:37:16
问题 When manually adding a contact's phone / IMS in the iOS AddressBook, you can add a Custom Label instead of "Home", "Work", "Other" * (in IMS). How to create "Custom Label" in AddressBook programmatically? 回答1: I had this exact same question. I couldn't find an answer so I just tried the guess and check method. The following code seems to work: CFErrorRef error = NULL; ABAddressBookRef iPhoneAddressBook = ABAddressBookCreate(); ABRecordRef newPerson = ABPersonCreate(); ABRecordSetValue

How to add a “Custom Label” to iOS AddressBook programmatically?

孤街浪徒 提交于 2019-12-21 02:37:03
问题 When manually adding a contact's phone / IMS in the iOS AddressBook, you can add a Custom Label instead of "Home", "Work", "Other" * (in IMS). How to create "Custom Label" in AddressBook programmatically? 回答1: I had this exact same question. I couldn't find an answer so I just tried the guess and check method. The following code seems to work: CFErrorRef error = NULL; ABAddressBookRef iPhoneAddressBook = ABAddressBookCreate(); ABRecordRef newPerson = ABPersonCreate(); ABRecordSetValue

How do I get the cropping frame of the address book image data?

▼魔方 西西 提交于 2019-12-20 20:18:22
问题 The AddressBook framework provides ABPersonCopyImageData for getting the contact image for each address book entry. This is great for the image data, but the user also sizes and crops the image for framing purposes. When I get the image data, I get the full image, and not the cropped image. How do I get the frame the user used to crop the image (or in lieu of that, how do I get access to the cropped image/data)? 回答1: iOS 4.1 adds a new method: ABPersonCopyImageDataWithFormat in ABPerson . I'm

Is there any way to get the “Me” card from iPhone Address Book API?

孤街醉人 提交于 2019-12-20 17:30:04
问题 So I'm stumped on this one. In Mac OS X there is an easy way to get the "Me" card (the owner of the Mac/account) from the built-in address book API. Has anyone found a way to find out which contact (if it exists) belongs to the owner of the iPhone? 回答1: You could use the undocumented user default: [[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"]; and then search the address book for the card with that phone number. Keep in mind that since the User Default is

Memory leaks with AddressBook framework

孤街浪徒 提交于 2019-12-20 10:57:08
问题 I'm having some memory leaks with both ABAddressBookGetPersonWithRecordID and ABPersonSetImageData. I've been looking for solutions before posting here but I still don't understand. If I play quite a long time with the iPhone 3GS or with only a few contacts with iPhone 3G, actually the application crashes. Here is my code in the didSelectRowAtIndexPath method. I've seen sample codes with these methods and I don't see what I'm missing. Thank you in advance. (sorry for mistakes...) Contact

How to retrieve address book contacts with Swift?

不想你离开。 提交于 2019-12-20 09:57:58
问题 I don't understand why my code doesn't compile with Swift. I am trying to convert this Objective-C code: CFErrorRef error = NULL; ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, &error); if (addressBook != nil) { NSLog(@"Succesful."); NSArray *allContacts = (__bridge_transfer NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook); } This is my current rendition in Swift: var error:CFErrorRef var addressBook = ABAddressBookCreateWithOptions(nil, nil); if (addressBook !=

Blackberry - make a call from native address book

偶尔善良 提交于 2019-12-20 04:26:11
问题 how to make a call from menu item appended in native book of BB('Call from ABC' option)? 回答1: Initiate call programmatically For RIM OS 4.7 and lower use Invoke: PhoneArguments phoneArgs = new PhoneArguments(PhoneArguments.ARG_CALL, "555-5555"); Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, phoneArgs); For RIM OS 5.0 declared we can use Phone.initiateCall method: Phone.initiateCall(Phone.getLineIds()[0], "519-555-0100"); See Make a call from a BlackBerry device application (multi-line