将 iOS 应用程序大小减小到 App Store [英] Decrease iOS Application size to App Store

查看:34
本文介绍了将 iOS 应用程序大小减小到 App Store的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 App Store 中提交一个应用程序,如果可能的话,我需要稍微减少它的内存.我尝试了一种我将在下面描述的方法来使我的应用程序更轻巧,但运气不佳.

I am trying to submit an application in App Store, and I need to decrease its memory a little bit, if this is possible. I tried a method which I am gonna describe below to make my app lighter, but with not luck.

我按照这些步骤查看是什么导致了如此大的尺寸

I followed these steps to see what was causing this large size

  1. 对项目进行归档
  2. 分发
  3. 为企业或临时部署保存
  4. 选择.ipa文件并将扩展名改为.zip
  5. 解压并打开Payload
  6. 显示包裹内容

内容

我有 680 个 Kb.png 文件(当我添加大约 32 kb 的文件时),我删除了它们并将应用程序的大小减小了 2 MB.除了一个可执行文件占用 .ipa 的 大小的 90% 之外,还有其他文件占用空间但并不多.

Contents

I had .png files with 680 Kb (when I added those where 32 kb approximately), I deleted them and I reduced the size of application by 2 MB. There are other files that take space but not considerably, except one executable file that is taking about 90 % of the .ipa's size.

是否可以减小可执行文件的大小?如果没有,那么您能否给我一个提示,我应该在哪里使我的应用程序在大小方面更轻.

Is it possible to decrease executable file's size? If not then can you give me a hint where I should look to make my app lighter in terms of size.

PS 我在 Vuforia SDK 等第三方库和GitHUB

P.S I use third party libraries like Vuforia SDK and libraries on GitHUB

推荐答案

我怎样才能减小这个可执行文件的大小

您无法减小构建的应用程序包中的可执行文件的大小.这是你的代码!减小其大小的唯一方法是:

You cannot reduce the size of the executable inside your built app bundle. This is your code! The only ways to reduce its size are:

  • 削减代码.显然您不能这样做,因为您会排除使您的应用正常工作的功能.

  • Cut code. Obviously you can't do that because you would exclude functionality that makes your app work.

删除架构切片.您不应该这样做,因为您想为所有可能的架构进行构建.

Remove an architecture slice. You should not do that because you want to build for all possible architectures.

话虽如此……我从来没有在应用程序包中生成过这么大的可执行文件.也许您测量/构建错误:

Having said that... I have never generated an executable inside the app bundle anywhere near this large. Maybe you are measuring / building wrong:

  • 确保您正在存档.除了存档之外,没有其他东西值得衡量.

  • Make sure you are archiving. Nothing else except an archive is worth measuring.

确保在存档时生成发布版本.

Make sure that you are generating a Release build when you Archive.

确保您的发布版本设置包括完整的编译器优化(最小、最快).

Make sure that your Release build settings include the full compiler optimization (smallest, fastest).

这篇关于将 iOS 应用程序大小减小到 App Store的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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