How IOS shrinks the size of a packaged project IPA

Source: Internet
Author: User

Before the project on-line completely by the technical boss, this time to develop their own, feel their packaging project volume slightly larger, online search for some of the more good methods, summarized here

1. Configure compilation options (within the Levels option) Genetate Debug Symbols set to No, this configuration option should let you subtract half volume.

2, abandon the architecture armv7, because armv7 to support 4s and 3gs,4s is officially launched in November 2011, although there are a small number of people in use, but the pursuit of the size of the package can be abandoned.

3, the compiled version must be a release version,

4, find the internal use of the third-party library, on the one hand can be deleted code, the use of classes, direct deletion, as well as the third-party library of the picture resources are all deleted, if you can write their own, the cost of writing it yourself

Only a few of the above operations are complete, the project can generally be surprisingly small.

Other resources related to:

Image

Compress images that are not important to use 8bit PNG images appropriately

1. What is vector graph vector diagram is generated by the computer algorithm, can be infinitely enlarged or reduced, there will be no loss, usually by the vector software production.

2. What is a bitmap bitmap is made up of a small color block, you can see those small color blocks, the more small color blocks within the same area, the higher the resolution.

3. The advantages and disadvantages of vector diagram can be infinitely enlarged or reduced, without affecting the image quality, file size is small, editing flexibility. The disadvantage is the expression of the color level is unclear, the overall perception effect is inferior to bitmap

4. The advantages and disadvantages of the bitmap can not be too large, reduce the file resolution will affect the picture quality, picture victory over space, the advantage is very delicate to express the effect of the picture, the picture is very good expression effect

5. What is the case with bitmaps, and under what circumstances use a vector diagram with bitmaps, such as photographs, that require high graphics. The others try to use a vector diagram. such as text, tables, cartoon pictures, etc.

Get rid of useless pictures

Draw simple, solid-color images with code to quickly draw code with sketch and Paintcode

If you do not need to use transparency, you can use JPEG instead of PNG. JPEG reduces efficiency but is smaller. Tradeoff between performance and size.

For 32-bit images, use the high compression rate, and use the PS "Save for Web" feature to effectively reduce the size of JPEG and PNG images. By default, the PNG image is Pngcrush compressed at build time.

Audio

Compress audio, use AAC or MP3 format as much as possible, and use a lower bitrate. Usually 44.1khz code rate is a bit wasteful, lower the bit rate will not lose much sound quality

Video

Video can also be used similar to the audio processing method, the compression of audio and video can be greatly compressed, but pay attention to the compression of the format, is not to increase the burden of codec, this should weigh the consideration.

Assets

Check the unused files in the bundle and do not pack them into the app or the static library. You can click on the file and uncheck it in target membership on the right side of file inspector, or remove it from the copy Bundle resources in Build phase.
OK dead Code (code defined but never called) is stripped, build setting dead_code_stripping = YES. Eliminate redundant code, even if a bit of redundant code, compiled after the volume is very considerable.

Transferred from: http://blog.5ibc.net/p/88743.html

How IOS shrinks the size of a packaged project IPA

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.