-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RN 0.62 upgrade renders huge iOS ipa build #28890
Comments
Any solution or hot fix yet? |
Hello, I tried run your command
with ${..} changed with my info, but I have still the issue I opened here: Do you know if this could share the same issue of yours? |
@azuxx I don't think my issue is related to yours. Your issue seems to be related to an older version of node that doesn't support the spread operator. Perhaps you have multiple version of node installed? Maybe try removing all versions of node and reinstall via Homebrew. According to this ticket related to your issue, removing all versions of node and installing the latest version helped solve the issue. It also states that if you don't have nvm installed to follow these instructions, however I don't have nvm installed on my machine, only npm, so IDK. From your terminal, run $ node -v, and $ npm -v and see what versions are running on your machine. I am currently running node v13.12.0 and npm v6.14.4. Also, are you able to build a release build via xCode's archive under the Product menu? BTW, you have to select the "Generic iOS Device" scheme to run the archive feature. |
@dquessenberry thank you but I have already followed this suggestion (#28848 (comment)) and yes I am using nvm with the latest node. I don't know what else I could try |
After inspecting the contents of my release ipa and comparing pre and post v0.62.2 builds, it appears this is related to the inclusion of Swift. If I remember correctly, in order to get v0.62.2 to build, I had to create a bridging header, which may have inadvertently included the Swift framework. Does any know if Swift is required for RN v0.62.2? |
You are right. I removed the bridging header from the project and successfully built it (all flipper related code and pods are commented out) and the build size is now back to normal. |
@lachtos that's great news! I removed the bridging header and did another build, but the Swift framework is still being included. Did you do anything else beside just removing the bridging header - like did you change any build settings too? |
@dquessenberry I haven't changed any build settings (I'm attaching my swift related settings in an image below). I deleted the .swift file and the bridging header, did clean and then built. |
@lachtos I can't seem to locate a .swift file in my project. However, I did set the "Always Embed Swift Standard Libraries" configuration on my Project build settings, as well as my main target and test target, to |
The .swift file I was talking about was the dummy file I created to trigger Xcode to create the bridging header. I think all this swift related stuff is for flipper, which I never intended to use (and I couldn't get my android builds to work with flipper) so I disabled all of it for the time being. This is also a hefty size increase for something that is not being used in production anyway. Hopefully these modifications we made don't compromise the stability of 0.62.2 |
Same issue here |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
I have a package named react-native-geolocation-service |
@dquessenberry there is a discussion here facebook/flipper#1275 about not building Flipper in production. The resolution is to wrap the Flipper Pod deps with an env variable. It is correct that the Swift file was added to allow Flipper support. But this was removed in 0.63.x I believe. #27922 Could you verify this happens in the latest RN version? |
|
I've had the same issue (RN 0.62.2), app jumped about 100mb in size after upgrading, so after some sweat I resolved it with:
Hope this helps someone :) |
I updated from 63.4 to 64.0 and enabled Flipper and Hermes, on iOS, and the I don't really see any docs on how to do release builds - it would be great to see resolution of this issue as well as updated docs to reflect the proper release build process. I build from Xcode by running Product -> Archive with a Run scheme set to Release. Does anyone have a good release build process or a link to one? |
I believe the massive increase in 0.64 is due to this bug in Hermes: facebook/hermes#499 My build size went up to 432mb, but at least once it gets into the app store it's a reasonable size. |
1.Need to do bitcode enabled - Yes at Build setting tab in xcode. |
I tried the suggestions of @nadimahamad with iOS target 13.2 resulting in:
Nevertheless ~500 MB for a framework is a lot in my opinion. |
Just go to build settings in xcode and search for bitcode. |
Should I disable Hermes in podfile? |
Hermes enabled on iOS is known to cause bigger release files. |
Lol. I have managed to reduce the archive size from 1GB to 130MB. Thank you @nadimahamad |
Your most welcome @rafaelmaeuer 😊 |
I want to have the improved performance from the hermes engine so thats no option for me... |
I used the npx react-native init Test to generate an empty project 0.70.6 with Hermes with iOS Target 13.2 |
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days. |
This issue was closed because the author hasn't provided the requested feedback after 7 days. |
Description
I recently upgraded from RN v0.60.5 to RN v0.62.2 and I noticed that my iOS release builds are now producing an .ipa file nearly triple in size, from ~50MB to ~130MB, however the adhoc builds increased from ~25MB to ~29MB. No other changes have been made to my app besides the upgrade, which I followed the Upgrade Helper tool for the migration. I did have one build issue with Flipper, which I was able to solve by modifying my pod file's flipper post install following these instructions. I can't seem to find any reason why my iOS build would be producing such a large release ipa file. I'm guessing it has something to do with Flipper, but that is simply a guess. I do have several existing images and fonts that I can probably be removed from my app to decrease the overall size, but regardless, why would my builds produce such a huge increase in size? I can't seem to find any reason for this. By the way, the Android build produces an release apk size fairly similar to the pre upgrade size (~49MB to ~50MB). Also to note, this is not an Expo project, but a RN Cli project.
Additionally, here is my build script that produces both an adhoc and release build:
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
I expect the release build ipa file size to be similar to the file size prior to upgrading to RN v0.62.2 from RN v0.60.5
The text was updated successfully, but these errors were encountered: