2

I am using xcode 6.0.1 and after setting all App Icons and Default Images my app size is jumped by 13 MB.

My App support iOS 5.1.1 and Later. Using Vector image don't support iOS 5.1.1 and iOS 6.x, I am not sure what i can do to reduce the build size.

Haroon
  • 697
  • 1
  • 9
  • 24

3 Answers3

2

Check list that might help you

->The first step is to look at your .app bundle and see what files inside it are taking up the most space.Before trying any optimizations, you should measure. This will tell you what to focus on improving.

->Use 8-bit Images Where Possible Using an 8-bit PNG format where applicable can decrease your image size by a factor of 4 in comparison with 32-bit images. 8-bit images support a maximum of 256 different colors, so they should only be used images which use a small set of colors.

->Use High Compression for 32 bit Images Where Possible Using Adobe Photoshop’s “Save For Web” feature can reduce the size of JPEG and PNG images considerably. By default, .png images will be compressed with pngcrush by Xcode automatically when the app is built.

->Check Your App, Usually apps contain extra files, like headers or a readme, that are never used.Be sure that you aren’t including any resources that aren’t used in your current project. ->Make sure dead code (code which is defined but never called) is stripped. Check that build setting DEAD_CODE_STRIPPING=YES.(Under your target build settings, then under "Linking" there is an option for "Dead Code Stripping". It defaults to yes for projects created with Xcode. )

->What type of sounds files are you using? .caf files are incredibly large. As a general rule, you should compress audio using AAC or MP3, and experiment with a reduced bitrate. Quite often a 44.1khz sample is overkill and a lower-bitrate clip won't have a perceptible drop in quality.

->If you do not need to support iOS devices running all iOS versions.Specifying architecture/s to which the binary is TARGETED. This eliminates other architectures and reduces some size.

->Strip the binary of debugging and internal symbols (build settings STRIP_LINKED_PRODUCT=YES, STRIP_STYLE=all, DEPLOYMENT_POSTPROCESSING = YES). ->"Slender" tool will let you know the unused graphics in your app.

http://itunes.apple.com/us/app/slender/id493656257?mt=12

P.S. Before you make changes refer below source once.

Source:https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html and https://developer.apple.com/library/ios/qa/qa1795/_index.html#//apple_ref/doc/uid/DTS40014195-CH1-MEASURE

Avis
  • 505
  • 4
  • 14
  • Thanks for your efforts for providing me step to step description @Avis, although I am using most them already,But It will very useful for the other users looking for it. – Haroon Oct 16 '14 at 07:07
0

I observed that when we drag and drop images in Assets folder, the system creates copy of them if you specified the image set to be Device Specific. E.g: If you specified an image "A" for iPhone and same image for iPad (individually), the system will maintain two copies of "A" rather pointing to one same image. In this way the size keeps on increasing because of duplicate images. Check for that also.

Jamal Zafar
  • 2,179
  • 2
  • 27
  • 32
-2

images.xcassets size is depends on the image size.Try to reduce the image size if you want to reduce the app size.You can un Zip the ipa file and check which component have larger size.Try to use png images instead of jpeg if used.