在开发时确定iOS .app捆绑包大小的最简单方法是什么? [英] What is the easiest way to determine an iOS .app bundles size while developing?

查看:80
本文介绍了在开发时确定iOS .app捆绑包大小的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请务必确保提交给AppStore的每个iOS应用程序的大小都在20MB以下,以便可以无线下载.

It is important to make sure every iOS application submitted to the AppStore is under 20MB in size so that it can be downloaded over-the-air.

我正在开发可能接近该限制的应用程序,但我发现似乎没有一种简单的方法可以从XCode内判断当前输出的.app包的大小.

I am working on an app that may be getting close to that limit, and I've discovered that there does not appear to be an easy way to tell the current output .app bundle size from within XCode.

尤其是在XCode4中-默认情况下,每个构建都隐藏在一个难以获取的名称中,并使用隐式命名的temp目录.除非必须,否则我不想覆盖此默认行为.

In XCode4 in particular - by default every build is tucked away in a hard to get at and cryptically named temp directory. I don't want to override this default behavior unless I have to.

我知道我可以通过查看构建日志,打开Shell窗口,更改到该目录并使用'du'来跟踪.app捆绑软件-但我希望找到一种更快捷的跟踪方式每次新构建后.app文件大小的变化.

I know I can track down the .app bundle by looking at the build logs, opening a shell window, changing to that directory, and using 'du' - but I am hoping to find a quicker and easier way to keep track of the .app file size after each new build.

甚至没有简单的方法可以直接在iPhone或iPad上确定应用程序的大小.通常,我很欣赏这一点-但是当我处于优化之中时就不会如此.

There isn't even an easy way directly on an iPhone or iPad to determine the size of an application. Mostly I appreciate this - but not when I am in the midst of optimization.

对最佳做法有何想法?

更新:我现在在大多数日常开发中都使用XCode 4,到目前为止,似乎所有解决方案都无法在XCode 4上使用,因为功能已更改或功能(例如存档)仍会很快到来.我认为最终的答案可能是在开发的特定阶段使用XCode 3".我知道我仍然仍然需要使用XCode 3进行最终的构建和提交...

UPDATE: I am using XCode 4 now for most of my day-to-day development, and it seems that every solution so far doesn't work on XCode 4 either because functionality has changed or features (such as Archiving) are still coming soon. I think the ultimate answer may be "use XCode 3" for the particular phase of development. I know I will still need to use XCode 3 for the final build and submission anyway...

推荐答案

创建脚本(perl,bash,AppleScript等),并将其添加到构建脚本中.然后,脚本可以将其CD锁定到魔术位置,将.app压缩到/tmp,将-s -h生成的zip压缩,然后将输出通过管道传输到某些日志文件...甚至可能会闪烁亮起的红色警告灯连接到USB并行端口中继以警告您超出某些文件大小限制.

Create a script (perl, bash, AppleScript, whatever...) and add it to your Build Scripts. The script can then cd to magic location, zip the .app to /tmp, du -s -h the resulting zip, and pipe the output to some log file... maybe even flash bright red warning lights hooked to a USB parallel port relay to warn you of exceeding some file size limit.

这篇关于在开发时确定iOS .app捆绑包大小的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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