IOS XCode7 Production. Summary of the framework dynamic library and. A static library

Source: Internet
Author: User

First, the development of the SDK support situation:

OC Language Production dynamic library, support Ios8+;oc language production static library, support ios7+.

Swift language production dynamic library, support ios8+; Swift does not support static libraries .

For the SDK, the support situation is very important. Like I was in the beginning of the pit, I use Swift to develop a dynamic library of the way to provide the SDK, so only support to ios8+. But that means all the apps that use my SDK have to go to ios8+, which is the pit daddy.

So if you need to support iOS7, only use OC language to develop. A static library of a road.

Second, the simple process of developing the dynamic library:

When developing a dynamic library, you can choose either OC or swift language development as long as you select the Cocoa Touch framework by creating a project.

After the new SDK project, and then create a new app project as a demo, drag the previous project, and the SDK generated product added to the app Project link library, through the way of engineering portfolio development, debugging is very convenient

1.

2.

3.

Developing a dynamic library may seem simple, but there are some tricky issues, such as how the SWIFT project calls (or the dynamic libraries developed by Swift, the OC Support), the resource files cannot be found, and so on, such as when OC develops the SDK.

Some of the questions I have summed up in this article

Http://www.cnblogs.com/rayshen/p/5330512.html

Second, the simple process of developing a static library:

When developing a static library (only developed in OC language), simply select the Cocoa Touch Static Library by creating a project

As before, we'd better create a new app to do the demo, easy to debug their own SDK

2. Create a new app project and drag it into the static library's SDK project

3. Add index to. A

IV. Resource management When developing a static library

1. Select the project of the SDK, click on the + in target, then select OSX, add the target of the resource bundle (this is really very silly, iOS didn't have the option to build bundles, laughed)

2. Change the bundle's target to IOS

3. If we create a new controller, with Xib, choose bundle->build phases, add xib, or image and other resource files

Then, in the new app project, you can use the. H,.a,.bundle with the.

IOS XCode7 Production. Summary of the framework dynamic library and. A static library

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.