Xcode6 making iOS. A static library small note

Source: Internet
Author: User

Create an iOS static library
simply write a printed code

after the encoding is complete, the direct run will successfully generate the. A file, select Xcode->window->organizer->projects->your Project, open the project's derived data directory, This will find the generated. A file,


the static library generates
If you want to import a static library, there are three waysThe first type:is to add the include and. A to the project by adding Files to "mylib" method add to target project->build Phases->link Binary with libraries inside
whether copy is checked according to your needs
The second type: Drag the project that generates. A directly to the project you want to use . Xcodeproj then in the build phases->target Dependencies click "+" to add the Target of the Static library project to the inside
Third: Set the search path for the corresponding. A and header files in build settings
Xcode 5 After the auto link, of course, preferably in other linker flags plus-LLIB

Finally, the careful classmate will find that I use the static library libmyframework.a is actually a project to create a static libraryto test if a static library references B static libraries, do you still need static library B? after my experiment, I found that the first kind of use, the other two have toonce the encoding is complete, the direct run will be able to successfully generate the framework file, select Xcode->window->organizer->projects->your Project and open the project's derived Data directory, so you can find the generated framework file,

Xcode6 making iOS. A static library small note

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.