Skip to content

Commit 59abb5f

Browse files
Titozzzfacebook-github-bot
authored andcommitted
fix(hermes): fixed hermes build on iOS (#31559)
Summary: While testing 0.65, we noticed issues with hermes on iOS in the template projects These changes create a subspec to the react-core pod so that it can access hermes header correctly. ## Changelog Not applicable Pull Request resolved: #31559 Test Plan: I've ran e2e manual test. Tested RNTester manually also. Then tested a project inited with hermes and the default template Reviewed By: mhorowitz Differential Revision: D28564642 Pulled By: Huxpro fbshipit-source-id: cfcb3363254f62a0e514ec99159b32f841ee4463
1 parent b161241 commit 59abb5f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

React-Core.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Pod::Spec.new do |s|
4848
s.header_dir = "React"
4949
s.framework = "JavaScriptCore"
5050
s.library = "stdc++"
51-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\"", "DEFINES_MODULE" => "YES" }
51+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"", "DEFINES_MODULE" => "YES" }
5252
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
5353
s.default_subspec = "Default"
5454

React/CxxBridge/RCTCxxBridge.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@
4040
#import <reactperflogger/BridgeNativeModulePerfLogger.h>
4141

4242
#ifndef RCT_USE_HERMES
43-
#if __has_include(<hermes/hermes.h>)
43+
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
4444
#define RCT_USE_HERMES 1
4545
#else
4646
#define RCT_USE_HERMES 0
4747
#endif
4848
#endif
4949

5050
#if RCT_USE_HERMES
51-
#import <reacthermes/HermesExecutorFactory.h">
51+
#import <reacthermes/HermesExecutorFactory.h>
5252
#else
5353
#import "JSCExecutorFactory.h"
5454
#endif

packages/rn-tester/RNTester/AppDelegate.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#import "AppDelegate.h"
99

1010
#ifndef RCT_USE_HERMES
11-
#if __has_include(<hermes/hermes.h>)
11+
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
1212
#define RCT_USE_HERMES 1
1313
#else
1414
#define RCT_USE_HERMES 0

0 commit comments

Comments
 (0)