Skip to content

Commit 76fb7c8

Browse files
authored
fix: add ReactCommon to HEADER_SEARCH_PATHS (#734)
Co-authored-by: war-in <[email protected]>
1 parent 1a71f48 commit 76fb7c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

RNLiveMarkdown.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ react_native_minor_version = react_native_json['version'].split('.')[1].to_i
66

77
pods_root = Pod::Config.instance.project_pods_root
88

9-
worklets_installed = system(%Q[
10-
cd "#{Pod::Config.instance.installation_root}" &&
11-
node -e "require.resolve('react-native-worklets/package.json')" > /dev/null 2>&1
12-
])
139
react_native_worklets_path = `cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native-worklets/package.json')"`
1410
worklets_installed = react_native_worklets_path != ""
1511
worklets_package_name = worklets_installed ? 'react-native-worklets' : 'react-native-reanimated'
@@ -18,6 +14,9 @@ react_native_worklets_or_reanimated_node_modules_dir = ENV['REACT_NATIVE_WORKLET
1814
File.dirname(`cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('#{worklets_package_name}/package.json')"`)
1915
react_native_worklets_or_reanimated_node_modules_dir_from_pods_root = Pathname.new(react_native_worklets_or_reanimated_node_modules_dir).relative_path_from(pods_root).to_s
2016

17+
react_native_react_common_dir = File.join(react_native_node_modules_dir, 'react-native/ReactCommon')
18+
react_native_react_common_dir_from_pods_root = Pathname.new(react_native_react_common_dir).relative_path_from(pods_root).to_s
19+
2120
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
2221
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
2322

@@ -45,6 +44,7 @@ Pod::Spec.new do |s|
4544
"HEADER_SEARCH_PATHS" => [
4645
"\"$(PODS_ROOT)/#{react_native_worklets_or_reanimated_node_modules_dir_from_pods_root}/apple\"",
4746
"\"$(PODS_ROOT)/#{react_native_worklets_or_reanimated_node_modules_dir_from_pods_root}/Common/cpp\"",
47+
"\"$(PODS_ROOT)/#{react_native_react_common_dir_from_pods_root}\"",
4848
].join(' '),
4949
}
5050
if worklets_installed

0 commit comments

Comments
 (0)