Skip to content

Commit

Permalink
fix(apple): prepare react-native-codegen when using main (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored Jan 26, 2022
1 parent 86a3f0e commit 480e117
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ios/use_react_native-0.64.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'open3'

def include_react_native!(options)
react_native, flipper_versions, project_root, target_platform = options.values_at(
:path, :rta_flipper_versions, :rta_project_root, :rta_target_platform
Expand All @@ -8,6 +10,11 @@ def include_react_native!(options)
use_flipper!(flipper_versions) if target_platform == :ios && flipper_versions
use_react_native!(options)

# If we're using react-native@main, we'll also need to prepare
# `react-native-codegen`.
codegen = File.join(project_root, react_native, 'packages', 'react-native-codegen')
Open3.popen3('yarn', :chdir => codegen) if File.directory?(codegen)

lambda { |installer|
react_native_post_install(installer)
if defined?(__apply_Xcode_12_5_M1_post_install_workaround)
Expand Down

0 comments on commit 480e117

Please sign in to comment.