(101) Integrated static library Rhaddressbook realize OC Access Address Book

Source: Internet
Author: User

It is inconvenient to use the official AddressBook framework to access the Address book only in C, which describes the method of integrating third-party framework Rhaddressbook, which can access and manipulate contacts through OC.

The framework is a static library, and the integration is more complex.

First download the framework: Rhaddressbook, here are some introduction to integration, the following simple introduction to the integration process.

① first drag the static library project directly into its own project:

② Choose in their own project , the project configuration select Build phases, follow the import two files, click on the left side of the plus sign to add.

③ Select the build Settings, search for the header searching path (note not paths), add a path include, pay attention to the right to select recursion.

④ searches other linker flags, adding-OBJC and-all_load compilation tags.

-OBJC tells the linker to load the defined OC class and classification, and if there are classes and classifications in the static library, the flag must be added.
-all_load is used to handle bugs in the-OBJC, and if the class library has only categories with no classes, the classification is not loaded by default, and this will force the classification to load.

⑤ Import the master header file #import <rhaddressbook/addressbook.h> Note that missing this step will cause an error in the project.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

(101) Integrated static library Rhaddressbook realize OC Access Address Book

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.