OGeek|极客世界-中国程序员成长平台

标题: ios - 带有 Expo 的独立应用程序 iOS 尺寸太大(218mb) [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 14:40
标题: ios - 带有 Expo 的独立应用程序 iOS 尺寸太大(218mb)

在开始之前,对不起我的英语!我会努力的!

我想为 iOS 构建我的应用程序,所以我使用了“exp build:ios”,但这让我的 IPA 太大(> 200mb) 所以我尝试分离我的应用程序以使用 ExpoKit 进行编译,但这不是一个独立的应用程序......这使我成为一个连接到 expo 服务器以启动我的代码的应用程序(并在我每次启动时下载它)

我应该如何构建我的应用程序,并让它具有更好的大小(大约 30mb)

感谢您的帮助!



Best Answer-推荐答案


Hi! Your IPA contains bitcode, as well as slicing for a few different device architectures, so it doesn't represent the final binary that will appear in the App Store.

The Expo Client app, which is strictly larger than the code contained in your CRNA app, is currently 19.8 MB (compressed) in the App Store, and 26 MB when extracted onto a device. This varies slightly between versions as we update our SDK, but that's the ballpark figure.

https://forums.expo.io/t/ios-standalone-app-size-is-too-big

除此之外,您可能还需要考虑要捆绑哪些 Assets 。默认情况下,您使用的每个 Assets 都捆绑在二进制文件中,但其中任何一个都可以按需下载。您可以进入 app.json 并删除 assetBundlePatterns 键,然后重新构建。

更多信息请访问 https://expo.fyi/managed-app-size

关于ios - 带有 Expo 的独立应用程序 iOS 尺寸太大(218mb),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50990354/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4