From 7b088b103538c2e781996f5b06861b93d95cd95e Mon Sep 17 00:00:00 2001 From: LeoTM <1881059+leotm@users.noreply.github.com> Date: Wed, 20 Jul 2022 22:04:43 +0100 Subject: [PATCH] Allow `PRODUCTION=1 pod install` Mentioned in - https://github.com/reactwg/react-native-releases/discussions/21#discussioncomment-2945972 - https://github.com/facebook/react-native/pull/33882 Close: https://github.com/facebook/react-native/issues/33764 --- template/ios/Podfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/template/ios/Podfile b/template/ios/Podfile index 594b74dc56f576..b5dca028ccc0ca 100644 --- a/template/ios/Podfile +++ b/template/ios/Podfile @@ -4,6 +4,8 @@ require_relative '../node_modules/react-native/scripts/native_modules' platform :ios, '12.4' install! 'cocoapods', :deterministic_uuids => false +production = ENV["PRODUCTION"] == "1" + target 'HelloWorld' do config = use_native_modules! @@ -12,6 +14,7 @@ target 'HelloWorld' do use_react_native!( :path => config[:reactNativePath], + :production => production, # Hermes is now enabled by default. Disable by setting this flag to false. # Upcoming versions of React Native may rely on get_default_flags(), but # we make it explicit here to aid in the React Native upgrade process.