ios - 带有 Expo 的独立应用程序 iOS 尺寸太大 (218mb)

标签 ios react-native build expo

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

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

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

感谢您的帮助!

最佳答案

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/

相关文章:

ios - iOS核心数据“乐观锁定失败”

ios - swift - libc++abi.dylib : terminating with uncaught exception of type NSException (lldb)

ios - 何时在 iOS Autolayout 中使用乘数、优先级常量、纵横比?

android - 少数 Android 设备中的键盘覆盖输入文本会 react native expo 应用程序

eclipse - 将 Maven Web 应用程序运行到 Tomcat

maven - 如何为多模块项目中的特定模块激活 Maven 配置文件

iOS 9 : How to detect when user said 'Don' t Allow' to the push notification request?

android - 在 React Native 中按下 Android 后退按钮时如何防止键盘关闭?

android - React-Native:无法重新创建Android和iOS文件夹

build - 为要使用的任何构建分配全局变量/参数