通用二进制文件不是对设备内存造成巨大浪费吗?

发布于 2024-09-27 02:46:36 字数 374 浏览 0 评论 0原文

在为 iPhone / iPad 开发通用二进制文件时,我经常问自己:这真的那么好吗?我相信 iPhone 和 iPod touch 设备会简单地下载整个包,包括所有不相关的 iPad 内容。由于我的应用程序图形较多,iPhone 和 iPod touch 用户将遭受大约 10 MB 的不相关图形的困扰。它们只是垃圾,没有在他们的设备上使用。对于 iPad 用户来说也是如此,他们会看到 6 MB 之类从未使用过的垃圾图像数据。当然,还有设备的所有未使用的代码。

我想知道这是否真的是智能的。如果这真的是未来:下载并安装大量垃圾,然后担心购买 8 GB、16 GB、32 GB 甚至 64 GB 设备只是为了能够安装更多东西。我已经担心我拥有的许多通用应用程序只会用未使用的文件来破坏我的设备。这让我觉得自己很愚蠢。

While working on an universal binary for iPhone / iPad, I've been asking my self often: Is this really so good? I believe the iPhone and iPod touch devices will simply download the whole package, including all the irrelevant iPad content. Since my app is graphics-heavy, the iPhone and iPod touch users would suffer from about 10 MB of irrelevant graphics. They're just trash and not used on their device. Same for iPad users, who will see something like 6 MB of garbage image data which is never used. Of course, along with all the non-used code for the device.

I wonder if this is really intelligent. If this is really the future: Downloading and installing a lot of trash and then worrying about buying an 8 GB, 16 GB, 32 GB or even 64 GB device just to be able to install more stuff. I already fear lots of the universal apps I have are just trashing my device full with unused files. It makes me feel stupid.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤星 2024-10-04 02:46:36

任何图形不重的应用程序都值得为其制作通用二进制文件。例如:如果您只有标准的可可 UI 元素和一些数据。然后你要做的就是设置所有框架相对于框架的大小。

如果它实际上是一个单独的应用程序(即:您有大量适用于 iPad 版本的不同图片文件,那么就将其发布。即使它们只是更高分辨率的图片等,也没关系。)

Any apps that aren't graphic heavy are worth making a universal binary for. eg: if you just have the standard cocoa UI elements and some data. Then all you do is set all the frames relative to the size of the frame.

If its effectively a seperate app (ie: you've got a ton of DIFFERENT picture files for the iPad version, then release it as such. Even if they are just higher-res pictures and such, it doesn't matter.)

牵你手 2024-10-04 02:46:36

你认为这很愚蠢吗?每次进行小的代码更改时,请尝试重新下载整个 80MB 应用程序(资源和全部!)。 :)

鉴于您的数字为 8、16、32、64 GB;我假设您正在谈论存储容量,而不是 RAM。如果是这种情况,您可以考虑压缩资源并将其解压缩到应用程序的沙箱中,以便在将来启动时轻松访问。

或者,您可以仅将 iPhone / iPod 资源与应用程序捆绑在一起,并单独下载 iPad 特定的资源。用户可能不喜欢意外的带宽使用,甚至可能无法通过苹果公司的审查。

最后,您可以程序生成您的资源,您的用户会因为节省的空间而喜欢您(如果没有)电池寿命。也许结合两全其美并且只生成一次资源?

You think that's silly? Try re-downloading an entire 80MB app (resources and all!) every time a small code change is made. :)

Given your figures of 8, 16, 32, 64 GB; I assume you're talking about storage capacity, rather than "memory" in the sense of RAM. If this is the case, you may consider compressing your resources and unzipping them to the app's sandbox for easy access on future boot-ups.

Alternatively, you could bundle only the iPhone / iPod resources with the app and download the iPad-specific resources separately. Users might not like the surprise bandwidth usage and it might not even get past Apple.

Finally, you could procedurally generate your resources and your users will love you for the saved space, if not battery life. Perhaps combine the best of both worlds and only generate the resources once?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文