是什么导致IOS应用程序中的资产规模增加,我如何缩小呢? [英] What contributes to the size of assets in an IOS App and how can I shrink this?

查看:75
本文介绍了是什么导致IOS应用程序中的资产规模增加,我如何缩小呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Xcode 6内置的iOS应用程序,它使用资产目录存储71MB的图像.我在资产目录中仅包含@ 3x图像,以尝试将应用程序的大小保持在100MB以下. @ 3x规则的唯一例外是,我为AppIcon组添加了@ 1x和@ 2x图像.

I have an iOS app built in Xcode 6 which uses an Asset Catalog to store 71MB of images. I have only includes the @3x images in my Asset Catalog to try and keep the size of the app under 100MB. The only exception to the @3x rule is that I have included @1x and @2x images for the AppIcon group.

所有图像均为.JPG文件,但AppIcon文件为.png文件.

All images are .JPG files with the exception of the AppIcon files which are .png files.

当我存档并创建.IPA文件时,IPA的大小为117MB.打开并查看.IPA中Asset.car文件的大小时,我看到它的大小为130MB.将此与项目中的资产目录(71MB)对比.我要指出的是,显然不是其他已编译的代码占用了40 MB.

When I archive and create an .IPA file, the size of the IPA is 117MB. When I open and look at the size of the Asset.car file within the .IPA I see that it is 130MB. Contrast this to the Asset Catalog in the project which is 71MB. I am pointing this out to be clear that it's not other compiled code that is taking up 40 MB.

我想存档此应用程序,以便在可能的情况下将文件大小保持在80-90-MB以下.考虑到70MB的资产,IPA应该保持在100MB以下,但是我想知道如何完成此工作,或者我可能需要采取或采取其他步骤才能查看为什么我要在IPA中获取130MB的资产文件来获取70MB的图像

I would like to archive this app so that the file size stays under 80-90-MB if possible. The IPA should stay under 100MB given the 70MB of assets but I would like to know how to accomplish this or what other steps I might need to take or review to see why I am getting 130MB of an asset file in the IPA for 70MB of images.

推荐答案

该文章位于

The article at Assets.car is 6 times larger than actual Images.xcassets folder when archived seems to be the answer.

我的资产目录"中的整个JPEG集合都转换为明显更大的PNG.我将除了AppIcons和LaunchImage之外的所有内容都从Asset Catalog转换为普通文件夹.因此,那时我有一个充满JPEG的文件夹和一个小的资产目录.

The entire set of JPEGs in my Asset Catalog is converted to PNG's which are substantially larger. I converted everything except for my AppIcons and LaunchImage out of the Asset Catalog and into a normal folder. So at that point i had a folder full of JPEGs and a small Asset Catalog.

当我创建一个档案时,它的大小为67 MB,如此之小!

When I created an archive it was 67 MB so significantly smaller!

这篇关于是什么导致IOS应用程序中的资产规模增加,我如何缩小呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆