Decreasing the size of google maps sdk for ios

夙愿已清 提交于 2019-12-02 02:15:10

Keep GoogleMap framework outside of the project and just drag it in your project without copy file. It will reduce the file size. Only bundle file keep inside of your project.

a framework is bound to be larger than the compiled in code thats ending up in your ipa.

  • the framework has the code for N architectures, the headers and the resources
  • what you will use in the end is the code for 1 architecture and the resources

As far as I can remember it adds about about 1mb to your ipa


they now ship bitcode as the iPad is compiled on apple's side for each customer.

cd GoogleMaps.framework/Versions/Current
ls -lh GoogleMaps # 113 MB

If you don't support phones higher than the iPhone 5:

lipo -remove arm_v7 GoogleMaps -o GoogleMaps

If your development machine is a 64 bit machine:

lipo -remove i386 GoogleMaps -o GoogleMaps

And then:

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