IOS Address Book programming, listening for system address book changes, and ios address book

Source: Internet
Author: User

IOS Address Book programming, listening for system address book changes, and ios address book

Listen for address book changes

The client code must be implemented as follows:

/* Remove the registration function */-(void) dealloc {ABAddressBookUnregisterExternalChangeCallback (_ addressBook, ContactsChangeCallback, nil);}/* register the callback function */-(id) init {self = [super init]; [self addressBookHandle]; ABAddressBookRegisterExternalChangeCallback (_ addressBook, ContactsChangeCallback, nil); return self ;}/ * callback function to implement your own logic. */Void ContactsChangeCallback (ABAddressBookRef addressBook, CFDictionaryRef info, void * context) {NSLog (@ "ContactsChangeCallback ");}

_ AddressBook is the address book handle.

Listening rules:

When the App is active (During reception + background maintenance), the address book will be notified when it is modified.

When the App is not active (when suspended), the App cannot receive notifications. Instead, the App receives delayed notifications when it reaches the front-end.


How to back up an ios address book to Android?

When you find the address book, right-click the phone and check whether the backup function is available. If yes, you can directly perform the operation.

In iOS, how does one synchronize the address book with the latest version of Renren?

Because the existing iPhone version does not support Address Book synchronization on iOS 6, you cannot find it in privacy. Please wait for everyone to update the version. This is a big bug, the next version will be fixed,

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.