接近大小限制 - 手表应用程序的大小(50MB限制令人头疼。) [英] Approaching Size Limit - The size of watch application (50MB limit is headache.)

查看:161
本文介绍了接近大小限制 - 手表应用程序的大小(50MB限制令人头疼。)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序达到约49MB,我们不是中途。所以肯定会超过50MB的限制。我的问题如下:

Our app reaches approx 49MB and we are not halfway. So definitely it will exceed the limit of 50MB. I have few questions as follow.

1)watchOS中是否可以使用按需资源?

1) Is On-Demand Resources possible in watchOS?

2)我的资源(图片,自定义字体)制作2个副本,每个是手表应用程序,其他是手表扩展。如何解决?

2) My resources(images, custom fonts) make 2 copy each one is watch app and other is watch extension. How to solve that?

3)Swift核心和其他swift框架占用大约28MB的空间。有没有办法禁用它? (PS。我们禁用了位代码)

3) Swift core and other swift frameworks are consuming about ~28MB of space. is there any way to disable that? (PS. we have bit code disabled)

编辑watchOS4:

Edit for watchOS4:

以前我们的应用程序大小为44.3 MB但是当我们从xcode9生成IPA时,大小增加到54.5。

Previously our app size was 44.3 MB but when we generate IPA from xcode9 size increased to 54.5.

推荐答案

绝对只需在手表应用程序或手表扩展程序中包含资源即可节省空间,而不是两者兼而有之。对于故事板中使用的资源或在WatchKit方法中按名称引用的资源,例如 WKInterfaceImage setImageNamed(_:)方法,你应该将它们存储在手表应用程序中。对于通过路径或 UIImage 方法加载的任何资源,如 init?(命名:),您需要把它们放在你的WatchKit扩展中。

You can definitely save space by only including resources in either the watch app or the watch extension, not both. For resources used in your storyboard or referenced by name in WatchKit methods, like WKInterfaceImage’s setImageNamed(_:) method, you should store them in the watch app itself. For any resources loaded in code by path or with UIImage methods like init?(named:), you’ll want to put them in your WatchKit Extension.

这篇关于接近大小限制 - 手表应用程序的大小(50MB限制令人头疼。)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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