Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Oct 29, 2016 at 01:38 PM by erginbilgin for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by erginbilgin · Apr 04, 2016 at 08:44 AM · androidiosbuildxcodesize

Huge iOS Build

Hello,

I am developing a 2D game for mobile devices. I am using a lot of sprites in my project. My problem is;

-When I build for Android, my apk is around 50 MB which is quite normal.

-When I build for iOS, my build is around 450 MB and when I archive it in Xcode it gets 995 MB. (710, when I disable bitcode.) When I upload to iTunes Connect, it says compressed size is about 230 MB. And it's size on my iPhone is 530 MB.

I couldn't understand what is happening there.

Any idea or experience like this?

Edit: I have checked ipa sizes on iTunesConnect once it's finished processing. Ipa files are around 45 MB, which looks normal but install sizes are around 450 MB. Any ideas on how to decrease sprite sizes? I have ~300 sprites (each one takes 1.3 MB in the build.)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
2
Best Answer

Answer by phil_me_up · Apr 04, 2016 at 09:37 AM

300 sprites with each one being 1.3Mb? That seems huge.

Can you do any compression / packing at all? Can you make them PoT and use PVR compression (the device will thank you for lower memory usage if you can!)?

Aside from compression, there are a few things you should understand about iOS builds.

Firstly, it's likely that you are generating both the 32bit and 64bit executables. This is as intended and it will therefor make the size slightly larger on iOS.

Secondly, it's like that the XCode archive includes your dSym files (for de-symbolicating). Again, this is as intended and isn't going to be part of the downloaded ipa for the player. From the archive you can open the package and extract just the ipa contents to give yourself a better idea of the size without dyms. You can also ask XCode not to generate the dsyms if that helps during testing.

Thirdly, when you upload to apple, the will take the ipa contents, remove the executables, encrypt the contents, re-ad the executables and then compress. Unfortunatly for Unity, this seems to increase the build size quite dramatically. I'm not sure why but I'm guessing the build must contain a lot of contiguous zeros. The rule here is that if the ipa you are uploading is say 80Mb, the download for the player will probably be over 100Mb. It is slightly game specific though.

Fourthly (if that's as a word), the install size on the device is always much bigger. You'll note that the first time you run the game on the device the loading time is longer than normal. This is because it's decompressing.

Unity does publish some general guides on how to reduce build sizes too (stripping, framework usage etc). Might be worth looking through them: http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image erginbilgin · Apr 04, 2016 at 02:21 PM 1
Share

I solved my problem by converting all my sprites to PoT(just put margin to not lose any quality). I was confused because I developed exact same game with exact same sprites in Swift before and it took only 45 $$anonymous$$B memory on the device(when installed). I don't know what Xcode is doing with sprites but looks efficient. Yesterday after changing all my sprites to PoT, I managed to reduce ipa size to 33 $$anonymous$$B and installed size to 95 $$anonymous$$B. Still bigger than native app but close enough.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Build Server, both Android and iOS 0 Answers

My iPA is much larger than my apk 0 Answers

iOS Xcode Archive size is extreme 0 Answers

App size increased when ported to IOS 0 Answers

ios xcode 8 build error with google adbmob, GADMAdapterAdColony, ld: symbol(s) not found for architecture arm64 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges