2

I recently add quite a lot of code to my iOS static library project. I always create universal binary that support all platforms (from iPhone4S to the current iPhone7) but after addition of the codes (which increase the .a size) results in:

CreateUniversalBinary failed: file too large to create as a fat file because size filed in struct fat_arch is only 32-bits and size of architecture armv7 exceeds that

The error in xcode

I do a lot of googling but not a lot of people are creating large static libraries (2Gb in size). There is only one bug report on Apple's site that is relevant so far: Lipo max input file size is limited

But I don't understand how the OP patched lipo to output in 100Mb increment. lipo -help and the docs doesn't reveal much info.

Here're my settings:

Architecture settings

Does anybody ever encounter the same problem and/or know how to deal/workaround it?

Any direction are most welcomed..

Thanks in advance

Zennichimaro
  • 5,236
  • 6
  • 54
  • 78
  • Am I to understand that you're trying to make a library for an iOS app that'll exceed 512MB? ......Dude. – James T Snell Jun 07 '17 at 08:21
  • 1
    No, 2Gb of resulting static library size doesn't mean that it will add the same amount to the resulting .ipa, check this: https://stackoverflow.com/a/13754102/474330 – Zennichimaro Jun 07 '17 at 08:34
  • Okay, neat. Is that "4300586544" bytes? Seems like a lot more than 2GB... Like.. double. I guess that's not actually relevant to the question. I'll STFU. – James T Snell Jun 07 '17 at 08:38
  • yeah, it's like > 4Gb now, I got the 2Gb number from the Apple dev forum link. I have tried to reduce the size (strip debug symbols during copy, do not generate debug symbols), but that doesn't reduce much. Source code isn't that huge though – Zennichimaro Jun 07 '17 at 08:43

0 Answers0