Posts Tagged ‘optimization’


SDK 4.0 Bloated Executable

June 30th by Tommy Leung

In more SDK 4.0 learnings, we came across a file size problem with Propaganda Lander in moving to SDK 4. The Unix Executable File became twice as big as it used to be under the 3.0 SDKs. There was no rhyme or reason for this that we could see.

If you are someone who cares about keeping your app’s file size under the 3G download limit, it is important to optimize as best as you can do get it under 20MB. A lot of games really don’t care which will be an annoyance to someone who wants to buy the game but has no WiFi service nearby. Other games just can’t be that small and then there’s nothing you can do about it.

We are pretty adamant about keeping Propaganda Lander under 20MB. Even with all our wondrous musical tunes, movies with voice overs, and pretty graphics we demand to have a game that can be downloaded from anywhere there is a 3G signal. After all, we are making a game for a mobile phone first and a portable music device second.

The reason why the executable file was twice as big under SDK 4 was because it defaults to compiling for iPad as well as iPhone. I see no reason to have both binaries when most games have specific versions for iPhone and iPad. You can fix this by checking Build Active Architecture Only in the project settings.

You should enable Dead Code Stripping as well–it usually is by default. There’s also Optimization Level which defaults to [-Os] for fastest, smallest and tends to be best.