_RCTSetLogFunction build failure in release mode fixed with Dead Code Stripping = No #25745
Labels
Bug
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
I created a new project with 0.60.4. I was able to build and deploy the app to my physical iOS device with Debug scheme. I wanted to build for release by following the instructions here: https://facebook.github.io/react-native/docs/running-on-device
Specifically this line "go to Product → Scheme → Edit Scheme. Select the Run tab in the sidebar, then set the Build Configuration dropdown to Release."
After making that change I tried building a release mode version of the app to my device and the build failed with:
I found this stack overflow article that says
This change made the build pass successfully.
It looks like this is a common problem that has been around for a long time. It would be great to either change the default or figure out how to keep this code from being dead code eliminated.
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
Memory: 273.86 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.4 => 0.60.4
The text was updated successfully, but these errors were encountered: