iOS packaging. A static library step

Source: Internet
Author: User

Packaging a static library process
1. Create a static library
2. Implementation class
3. Open the. h file
4. Packaging Simulator Static Library
5. Packaging the true machine static library
6. Merging simulators and real-machine static libraries
7. Test the Static library

First, pre-work
1, new. A Static library project

2. Implement classes that need to be packaged

3. Add headers

4, then find Heaers (0 items) column, dot + add header file

5. Then add the header files that need to be exposed

6, after adding, the header file will appear in the Project column, you need to manually push into the public column to open

7. After drag-in, the header file in public is the open header file

Second, set scheme
1. Choose Edit Scheme


2. Compile the emulator version of the. a static library. Select simulator

3, after the selection of the simulator to compile, after the successful compilation, the products in the LIBENCRYPTION.A will be red into black

4. A static library that compiles a real machine version. Select a real machine

Third, merge the analog version and these versions of the static library
1. Select Libencryption.a, right-click the show in Finder

2. After entering the folder directory, you can see the compiled emulator and the real machine version. A static file

3, open the terminal, use the command in the version of the merge, the specific format for

lipo -create "真机版本.a静态库路径" "模拟器版本.a静态库路径" -output "合并后的.a静态库路径”
    • 1

Four, finally can test the static library
1. Drag the edited static library and. h file into the project

This is the entire process of packaging a static library

Reference Link: http://www.jianshu.com/p/add59ec093b6

iOS packaging. A static library step

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.