Skip to content

Commit

Permalink
fix(xcode): backport Xcode 14.3 fix to 69 (#36767)
Browse files Browse the repository at this point in the history
Co-authored-by: Riccardo Cipolleschi <cipolleschi@fb.com>
  • Loading branch information
kelset and Riccardo Cipolleschi authored Apr 3, 2023
1 parent 7d0a3d9 commit 74ba411
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/rn-tester/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ def pods(options = {}, use_flipper: false)
hermes_enabled = ENV['USE_HERMES'] == '1'
puts "Building RNTester with Fabric #{fabric_enabled ? "enabled" : "disabled"}.#{hermes_enabled ? " Using Hermes engine." : ""}"

if ENV['USE_CODEGEN_DISCOVERY'] == '1'
# Custom fabric component is only supported when using codegen discovery.
pod 'MyNativeView', :path => "NativeComponentExample"
end

use_react_native!(
path: @prefix_path,
fabric_enabled: fabric_enabled,
Expand All @@ -37,6 +32,11 @@ def pods(options = {}, use_flipper: false)
app_path: "#{Dir.pwd}",
config_file_dir: "#{Dir.pwd}/node_modules",
)

if ENV['USE_CODEGEN_DISCOVERY'] == '1'
# Custom fabric component is only supported when using codegen discovery.
pod 'MyNativeView', :path => "NativeComponentExample"
end
pod 'ReactCommon/turbomodule/samples', :path => "#{@prefix_path}/ReactCommon"

# Additional Pods which aren't included in the default Podfile
Expand Down
9 changes: 8 additions & 1 deletion scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
DEFAULT_OTHER_CPLUSPLUSFLAGS = '$(inherited)'
NEW_ARCH_OTHER_CPLUSPLUSFLAGS = '$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'

# This function returns the min iOS version supported by React Native
# By using this function, you won't have to manually change your Podfile
# when we change the minimum version supported by the framework.
def min_ios_version_supported
return '12.4'
end

def use_react_native! (options={})
# The prefix to react-native
prefix = options[:path] ||= "../node_modules/react-native"
Expand Down Expand Up @@ -420,7 +427,7 @@ def get_react_codegen_spec(options={})
'source' => { :git => '' },
'header_mappings_dir' => './',
'platforms' => {
'ios' => '11.0',
'ios' => min_ios_version_supported,
},
'source_files' => "**/*.{h,mm,cpp}",
'pod_target_xcconfig' => { "HEADER_SEARCH_PATHS" =>
Expand Down

0 comments on commit 74ba411

Please sign in to comment.