iOS development, how to package a static library. A file

Source: Internet
Author: User

1. Demand

We may develop some of our own in the work of developing iOS. A static library or package someone else's third-party class library into their own. a file. Sometimes when we introduce some C + + compiled third-party files, there may be compile errors, but if we package into. A static library, there will be very few OC and C + + mixed errors. The reason is simple. A static library file is a compiled binary file, and binary files and binaries are mixed with each other of course there is no problem. OK then let's start learning to pack!

2. Example

Next, we will afnetworking as an instance of the network request library that is commonly used in packaged iOS development.

1> we need to get ready to pack the Afnetworking

2> Next we start building a new project file named Wbafnetworking

3> Next we drag the prepared afnetworking into the project, noting that the files are placed in a first-level directory.

4> Next we choose to come up with a header file that needs to be exposed

I chose to expose all the header files as

5> Next we configure the project file

After the 6> configuration we can select the real machine to run after running we find the generated. A file right-click on the show in finder.

7. The. A file generated at this time only applies to the real machine, if we need the simulator can use the. a file in the same way to run on the emulator, and there are many online tutorials can be combined two. A file is not restated here.

iOS development, how to package a static library. A file

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.