5

XCode14 has disabled bitcode and Apple says they won't accept bitcode enabled apps. Disabling bitcode increases the size of our app by 2X. This can only help reduce the app size by a few Mb.

Has anyone faced this issue and been able to reduce their app size without bitcode enabled?

Keer
  • 75
  • 7
  • 1
    I am also facing this issue in our app https://apps.apple.com/in/app/phonepe-recharge-insurance/id1170055821. With Bitcode enabled and Xcode 13, the app size was around 189MB and now with Xcode 14 + bitcode disabled, it has shot-up to 342MB. Can someone please help or guide on how to reduce the app size? – Srikanth Oct 19 '22 at 17:57
  • Hi Srikanth saw your solution in [link](https://stackoverflow.com/a/74142041/9401766). I am getting this warning: changes being made to the file will invalidate the code signature in. Were you able to get your app approved after using the above solution. – Keer Nov 08 '22 at 04:41
  • Yes. We have released app 2 times to the App Store after the fix Keer. You should run the script on XCArchieve and not on the generated IPA. – Srikanth Nov 08 '22 at 14:48
  • /Users/keer/Library/Developer/Xcode/Archives/2022-11-08/Camera.xcarchive/Products/Applications/AppName.app This is where I do the stripping Srikanth? Can you give me the exact path in which you do it? I have followed the exact procedure as mentioned in your answer. Could you shed some light on where to run the script because the .xcarchive doesn't have the .app – Keer Nov 08 '22 at 19:23
  • You have mentioned “Camera.xcarchive/Products/Applications/AppName.app”. The path where you are trying to do this is correct. – Srikanth Nov 09 '22 at 02:05
  • Thanks! Have you raised this with apple? This is a temporary work around at best so maybe we can try raising this. We have started a mail thread and would probably be mentioning this difference in size to them as well. [Note: I have given you a connection request on LinkedIn to discuss further about the issue if possible please accept it] – Keer Nov 09 '22 at 05:16
  • Did you have any issues because of this in the crash reporting? That is are there any issues while symbolicating the crashes or anything else? – Keer Nov 09 '22 at 06:21
  • No, we did not find any issues in Crash reporting. Things look fine @Keer. – Srikanth Nov 09 '22 at 09:28

1 Answers1

1

Apple has suggested to enable the STRIP_INSTALLED_PRODUCT, STRIP_STYLE, and STRIP_SWIFT_SYMBOLS in Xcode build settings.

We didn't enable STRIP_INSTALLED_PRODUCT and thus the symbols were not stripped and we faced the above issue even when bitcode was disabled.

After setting STRIP_INSTALLED_PRODUCT to yes the app size was back to normal.

mfaani
  • 33,269
  • 19
  • 164
  • 293
Keer
  • 75
  • 7
  • 1
    Where did Apple suggest this? The reason I ask is that the default value for a target is No, while the default value for a project is Yes – mfaani Jan 18 '23 at 13:18