Go Xcode package. bundle files

Source: Internet
Author: User

There is often a need to encapsulate your own modules or open classes into static libraries to provide convenient calls to others.

But when you need to use a lot of xib, pictures, audio or other resource files in your module, you can't add them to the static library. At this point, some resource files need to be encapsulated. Bundle file. Well, the packaged stuff should contain three types of files:

1: Open header file (contains full call notes)

2: Static library file suffix named. A

3:bundle file for storing various resource files.

So the rest is simple: here is a specific package of bundle files (in fact, very simple)

First step: Create a bundle project

Select the bundle file type and create the project.

Step Two: Modify buildsetting Related Settings

1:base SDK modified to iOS6 or other existing iOS SDK versions

2:architectures modified to ARMv7 armv7s

Step Three: Add the resource file you want to add

Fourth Step: Build (This does not require a certificate and can be compiled successfully)



This generates your own bundle.

When called, the help needs to be referenced to the project.

If you want to be called in a non-mainbundle place. Then you need to load this bundle extra

NSBundle *buddle = [nsbundlebundlewithpath:@ "Your bundle file storage path"];

[Buddle load];//This step must be performed, otherwise buddle invalid

So you can put this bundle on any path called

Go Xcode package. bundle files

Related Article

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.