From 4e6186555eac8e98724e5027a882c92ee195652d Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Thu, 25 Apr 2024 08:18:20 -0700 Subject: [PATCH] Defines module for React-jsinspector (#44252) Summary: Defines module for `React-jsinspector` that for swift modules to integrate with. to fix https://github.com/expo/expo/issues/28209, any podspec depends on HermesExecutorFactory should use ` add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')` to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern". to depend on React-jsinspector from expo-modules-core, we need it to define as a module. otherwise, it will have the error ``` The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies. ``` ## Changelog: [IOS] [CHANGED] - Add `DEFINES_MODULE` for React-jsinspector.podspec Pull Request resolved: https://github.com/facebook/react-native/pull/44252 Test Plan: ci passed Reviewed By: cortinico Differential Revision: D56575102 Pulled By: cipolleschi fbshipit-source-id: 9b7b4568a3e499f0a741a79a846263118ff2d112 --- .../ReactCommon/jsinspector-modern/React-jsinspector.podspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec b/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec index e338fcd843e9b9..0a88f2362f477d 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec +++ b/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec @@ -38,7 +38,8 @@ Pod::Spec.new do |s| s.compiler_flags = folly_compiler_flags s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" + "CLANG_CXX_LANGUAGE_STANDARD" => "c++20", + "DEFINES_MODULE" => "YES" }.merge!(use_frameworks ? { "PUBLIC_HEADERS_FOLDER_PATH" => "#{module_name}.framework/Headers/#{header_dir}" } : {})