[iOS] Fixes template build failed in release mode#25751
[iOS] Fixes template build failed in release mode#25751zhongwuzw wants to merge 1 commit intofacebook:masterfrom
Conversation
|
Thanks for this. I wouldn’t have expected a tests file to cause the app to fail to build. Is that normal? Also, would it make sense to validate that release builds build successfully in CI to keep this kind of issue from sneaking back in? Should we also have a release scheme in the default template? I can’t imagine that anyone starts an RN project without wanting to build for release so they have to go through all those steps on their own. |
Yeah, we should avoid.
We don't use template project in main
Emm, we can left users to create, users don't use release mode to develop in most of the time, only when profile or publish app. |
elicwhite
left a comment
There was a problem hiding this comment.
I can’t land this from my phone so I’ll land it on Monday at work if someone else hasn’t landed it already by then
facebook-github-bot
left a comment
There was a problem hiding this comment.
@TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
This pull request was successfully merged by @zhongwuzw in 0fcaca8. When will my fix make it into a release? | Upcoming Releases |
|
Applying this change to |
Summary: Fixes facebook#25745, Xcode stripped dead code in Release mode, and in template test code, it should only run in Debug mode, so we can use a macro to fix this issue. ## Changelog [iOS] [Fixed] - Fixes template build failed in release mode Pull Request resolved: facebook#25751 Test Plan: 1. Create a new project using `react-native init AwesomProject`. 2. Change project target scheme to `Release`. 3. Build and it should success. Differential Revision: D16442643 Pulled By: TheSavior fbshipit-source-id: f08ed70523aa1aa418064465f8df367a06e8974f (cherry picked from commit 0fcaca8)
Summary
Fixes #25745, Xcode stripped dead code in Release mode, and in template test code, it should only run in Debug mode, so we can use a macro to fix this issue.
Changelog
[iOS] [Fixed] - Fixes template build failed in release mode
Test Plan
react-native init AwesomProject.Release.