Skip to content

Commit 480e117

Browse files
authored
fix(apple): prepare react-native-codegen when using main (#711)
1 parent 86a3f0e commit 480e117

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ios/use_react_native-0.64.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'open3'
2+
13
def include_react_native!(options)
24
react_native, flipper_versions, project_root, target_platform = options.values_at(
35
:path, :rta_flipper_versions, :rta_project_root, :rta_target_platform
@@ -8,6 +10,11 @@ def include_react_native!(options)
810
use_flipper!(flipper_versions) if target_platform == :ios && flipper_versions
911
use_react_native!(options)
1012

13+
# If we're using react-native@main, we'll also need to prepare
14+
# `react-native-codegen`.
15+
codegen = File.join(project_root, react_native, 'packages', 'react-native-codegen')
16+
Open3.popen3('yarn', :chdir => codegen) if File.directory?(codegen)
17+
1118
lambda { |installer|
1219
react_native_post_install(installer)
1320
if defined?(__apply_Xcode_12_5_M1_post_install_workaround)

0 commit comments

Comments
 (0)