I created phonegap app for both android and IOS using eclips and xcode4.5
The size of Andorid app is 650KB
The size of IOS app is 9MB!!!
I created empty phonegap app (just did create on terminal) and got the same size
How can I reduce the IOS application size ?
Thanks!
The standard iOS App includes lots of Artwork, e.g. for the CDVCapture plugin.
If you don't use the Capture API (which is likely), you could save 2.3MB by deleting the Capture.bundle in the Resources folder and removing CDVCapture from the Plugins list in the Cordova.plist.
Of course much of the filesize is caused by the various splash screens, icons and maybe artwork you use yourself. There is a very good way to minimize the cost of these. Get ImageOptim and drop your Xcode project folder on it. This will reduce the filesize of your images dramatically (without losing quality). One last step: Xcode recompresses all of the artwork, so they have a bigger filesize again (stupid, right?). Go to the Build Settings tab and type PNG into the search field. Set Compress PNG files to NO.
further reading on imageoptim & Xcode
The whole process should reduce your App by at least 50%, please report back how much you could achieve, thanks.
That would be the retina splash screen images.
10MB is a normal app size, don't worry about it.
Related
I've been making an iOS game (Head of State) since the beginning of the year. I launched it with ARMv64 architecture and the download size was just over 30MB. I want to publish an update with Universal architecture and some more content but now I'm struggling to get the download size under Apple's 100MB limit for downloading over cellular networks.
I know universal architecture will nearly double the size of the build, and adding more images also increased it. Before optimising the unity build size was 70MB and the Apple download size was 108MB. So, only 8MB to cut down I thought. But, after I tried reducing the file size by compressing textures and audio (following this guide for reducing file size), the unity size was down to 53MB, but the Apple download size was only down to 102MB...
I can't compress the audio or images more without it becoming very noticeable in game, and I don't understand how I can have cut the Unity build size by 17MB, but the Apple download size by only 6MB. I would love for someone to explain this to me and give me some tips for how to reduce the Apple download size that extra bit to get under 100MB.
Here are my Unity build settings
I'm using Unity 5.4.1f1 and Xcode 8.0
The default image compression for iOS looks bad but with a custom atlas packing policy you can override the compression quality and make it more bearable.
Have you checked from unity build log what'a taking most of the space?
Also, where are you checking the download size and have you tested that the build actually does not download over cellular? AFAIK the displayed size in app store is some uncompressed version and doesn't need to fit exactly 100MB
As I mention in the comments above, I ended up switching to .NET 2.0 subset from .NET 2.0 and this brought the package size down well under 100MB
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.
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
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.
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.
I am going to work on client application, in which he need to have whole app locally resources loading, and I have almost 70mb images files for iPad. I am going to start development soon but before that I need healthy suggestion and guidelines to reduce my app size with these images use locally. I don't want to make this heavy size like any 3d game? So I am looking for suggestion what should I do? Thanks in advance.
There are few ways:
zip all the image resources in the bundle. On first launch, extract that zip folder into documents directory and refer the image from there only. You will have to do it on first launch only.
create jpeg version of your images with some reduced quality. Apart from icon and splash, you can use jpeg version of images.
If possible, use 1 pixel width/height images for repetitive gradients.
I want to make an iOS app. This app will have over 200 images, each with different sizes (500x500[maybe smaller] and less). What is the best method to keep them, having a smaller app size?
I think about optimizing their sizes for web in photoshop, but still the app will have a big size if I want to keep and a respectful quality.
Any ideas?
Well, I don't know if you can do this for your app, but you can download them from the internet once the user installed your app. This way you can keep the size of the package as small as possible (I assume you talk about non-critical images, that can be obtain afterwards).
UPDATE
Alternatively you can use SVG instead of bitmaps, of course if applicable:
how to render svg file in iphone and ipad
This is related to Default-Portrait.png for iPad: any way to make the file size smaller?
Is there any way to specify a more efficient file format (like JPEG) for Default-Landscape.png
and Default-Portrait.png?
Yes it's possible to use jpg files as launch images. Just add "Launch image" key with the base filename (e.g. LaunchImage.jpg") to the Info.plist. Then add files to your project such as
LaunchImage.jpg
LaunchImage#2x.jpg
LaunchImage-568h#2x.jpg
and Xcode will pick them up.
However through personal experience I've discovered if you're supporting the larger iPhone 5 screen the App Store expects PNG format and uses the presence of PNG to determine iPhone 5 support and display of iPhone 5 size thumbnails on the store. Using JPG images will not show the app as iPhone 5 optimized in the app store (even though it will work fine on the device) so it is best to stick with PNG.
There is no way to use an image other than a png.
All launch images must be PNG files and must reside in the top level of your app’s bundle directory. Section: App Launch (Default) Images
Update: JPEG images to work and Apple's documentation no longer specifies that the images must be PNG files.
If you use xcassets, then since Xcode 6 you can use JPGs. However Xcode will still not let you drop JPGs into the LaunchImage folder. But you can do it in Finder. Simply drop your PNGs into that folder with Finder and then edit the JSON file changing all .png extensions to .jpg.
I haven't submitted an app to the store using this yet, but it works in the iPhone simulator at least.
Update: Doesn’t work on the device. I’ll leave this answer here anyway so people know that this technique was at least tried so the effort won’t be repeated.