Static library size: Android vs iOS

I created a very basic static library targeting both Android and iOS, that you can find here.

I found out that:

  • the libJuceDemo.a size for iOS is about 6.7 MB
  • the libJuceDemo.a size for Android can go up to 50.5 MB, depending on the targeted configuration

What can explain such a huge difference in size?

On Android, there are lot more architectures to support. They are all bundled into one binary. On iOS, for release binaries, it’s usually just one these days (arm64). Debug builds will be bigger on iOS partly due to symbols but also because they will also contain simulator architectures.

Thanks, but what I’m talking about is that each libJuceDemo.a file, just for one architecture, is much bigger, since there is one file per configuration (there are not bundled into one binary, there are actually 4 of them), so that’s why I don’t understand that difference in size.

Also, very surprisingly, I just noticed that when I build the library for Android in debug, the files are a little bit smaller compared to their release counterparts. I really don’t understand…

That being said, I wonder: I’m coping the library files from the following directory: build/intermediates/cmake/release_Release/obj/
Is that correct? Or should I take the file in build/generated/ap_generated_sources/release_Release/out/ (which somehow would make more sense, but it’s empty)?