Bundle size is big

时光总嘲笑我的痴心妄想 提交于 2019-12-02 01:52:36

问题


Is there a way to reduce the size of the framework ScoutMaps-iOS-SDK, because right now the size of the bundle is so huge and the user probably won't download an app with >100 Mb.


回答1:


For people who are interested:

To minimizing the size of the project you can do the following: Benchmark: demo project unpacked – 173.883.119 bytes (195,7 MB on disk)

Things that can be removed for iOS: 1. Remove all audio advices but en_us from SKAdvisorResources.bundle (Note: you can host & download the audio files on demand) 2. Remove Outdoorstyle and Grayscale style from SkMaps.bundle (if you're not using these syles) Demo project unpacked - 115.890.904 bytes (118,5 MB on disk) 3. Remove all other architectures but armv7 (there should be a small performance penalty on arm64, but since you exclude an entire set of architectures the size of the .ipa should be considerable smaller) - this change will be visible in the final .ipa file

Things that can be removed for Android: On Android you can repeat steps 1 and 2. Regarding architectures – if you have control regarding which Android devices you will be using, you can also remove the unused libraries (we have by default /libs/armeabi/libsngnative.so, /libs/armeabi-v7a/libsnative.so and /libs/x86/libsnative.so)

These are the things that can be done for the moment to decrease the size- but we're still working on this improvement for the next versions



来源:https://stackoverflow.com/questions/26982941/bundle-size-is-big

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!