iOS code encapsulated as. A files (Package SDK)

Source: Internet
Author: User

In the many open source of the Great God's blog is organized as follows: (Tested OK)

First, describe

Build Activearchitecture only set to Yes;

Architectures by Xcode default configuration, arm64 forward compatible;

To make. A static library, you need to ensure compatibility, including different iOS devices and emulator run error, so as far as possible to achieve maximum compatibility.

Validarchitectures set to: armv7|armv7s|arm64|i386|x86_64

Second, the text guide

1. Open Xcode, click File\new\project, select Ios\framework andlibrary\cocoa Touch Static library to create a new static libraries project.

2. The project name is at the discretion of its own needs.

3. All the xxx.h and xxx.m that need to be encapsulated are introduced into the project.

4. Introduce the header file.

5. Generate Static Library: Divided into 2 kinds of mobile phone and simulator (mobile phone only can call, simulator only can be adjusted)

1> generate emulator Static library, after generation, right-click a file, select Show in Finder to view;

2> generate the phone static library, after the generation, right-click a file, select Show in Finder can be viewed;

6. Open the terminal and use the following command to synthesize it to the desktop for easy access.

Lipo-create Simulator. A path in the real machine. a path-output/users/mac/desktop/libxxx.a

For example:

Lips (here is the space, no brackets)-create (here is the space, no brackets)/users/mac/library/developer/xcode/deriveddata/ staticlibrarynamesdk-fgfhddoykewmwkdnsmoesvcphdsk/build/products/debug-iphonesimulator/ LIBSTATICLIBRARYNAMESDK.A (here is the space, no brackets)/users/mac/library/developer/xcode/deriveddata/ STATICLIBRARYNAMESDK-FGFHDDOYKEWMWKDNSMOESVCPHDSK/BUILD/PRODUCTS/DEBUG-IPHONEOS/LIBSTATICLIBRARYNAMESDK.A ( Here is the space, no brackets)-output (here is the space, no brackets)/users/mac/desktop/libstaticlibrarynamesdk.a

After entering, enter, you can build on the desktop. A is what you need.

iOS code encapsulated as. A files (Package SDK)

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.