Skip to content

Commit a945bf6

Browse files
committed
fix(xcode): backport Xcode 14.3 fix to 68
1 parent 9e5dae3 commit a945bf6

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

packages/rn-tester/Podfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ def pods(options = {})
2626

2727
prefix_path = "../.."
2828

29-
if ENV['USE_CODEGEN_DISCOVERY'] == '1'
30-
# Custom fabric component is only supported when using codegen discovery.
31-
pod 'MyNativeView', :path => "NativeComponentExample"
32-
end
33-
3429
use_react_native!(
3530
path: prefix_path,
3631
fabric_enabled: fabric_enabled,
3732
hermes_enabled: ENV['USE_HERMES'] == '1',
3833
app_path: "#{Dir.pwd}",
3934
config_file_dir: "#{Dir.pwd}/node_modules",
4035
)
36+
37+
if ENV['USE_CODEGEN_DISCOVERY'] == '1'
38+
# Custom fabric component is only supported when using codegen discovery.
39+
pod 'MyNativeView', :path => "NativeComponentExample"
40+
end
4141
pod 'ReactCommon/turbomodule/samples', :path => "#{prefix_path}/ReactCommon"
4242

4343
# Additional Pods which aren't included in the default Podfile

scripts/react_native_pods.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
DEFAULT_OTHER_CPLUSPLUSFLAGS = '$(inherited)'
1515
NEW_ARCH_OTHER_CPLUSPLUSFLAGS = '$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
1616

17+
# This function returns the min iOS version supported by React Native
18+
# By using this function, you won't have to manually change your Podfile
19+
# when we change the minimum version supported by the framework.
20+
def min_ios_version_supported
21+
return '12.0'
22+
end
23+
1724
def use_react_native! (options={})
1825
# The prefix to react-native
1926
prefix = options[:path] ||= "../node_modules/react-native"
@@ -363,7 +370,7 @@ def get_react_codegen_spec(options={})
363370
'source' => { :git => '' },
364371
'header_mappings_dir' => './',
365372
'platforms' => {
366-
'ios' => '11.0',
373+
'ios' => min_ios_version_supported,
367374
},
368375
'source_files' => "**/*.{h,mm,cpp}",
369376
'pod_target_xcconfig' => { "HEADER_SEARCH_PATHS" =>

0 commit comments

Comments
 (0)