Skip to content

Commit e3eca55

Browse files
authored
fix(iOS,Fabric): fix MUTATION_PARENT_TAG definition when using dynamic frameworks (#2737)
## Description It seems that '-' characters in import names are swapped for '_' when using dynamic frameworks, therefore we need to check not only for `React-RCTAppDelegate` but also for `React_RCTAppDelegate`. ## Test code and steps to reproduce Build with `USE_FRAMEWORKS=dynamic` now passes. ## Checklist - [ ] Ensured that CI passes
1 parent 76f73dd commit e3eca55

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ios/utils/RNSDefines.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
#define RNS_IGNORE_SUPER_CALL_END _Pragma("clang diagnostic pop")
88

99
#if defined __has_include
10-
#if __has_include( \
11-
<React-RCTAppDelegate/RCTReactNativeFactory.h>) // added in 78
10+
#if __has_include(<React-RCTAppDelegate/RCTReactNativeFactory.h>) ||\
11+
__has_include(<React_RCTAppDelegate/RCTReactNativeFactory.h>) // added in 78; underscore is used in dynamic frameworks
1212
#define RNS_REACT_NATIVE_VERSION_MINOR_BELOW_78 0
1313
#else
1414
#define RNS_REACT_NATIVE_VERSION_MINOR_BELOW_78 1
1515
#endif
16+
#else
17+
#define RNS_REACT_NATIVE_VERSION_MINOR_BELOW_78 \
18+
1 // Wild guess, close eyes and hope for the best.
1619
#endif
1720

1821
#if RNS_REACT_NATIVE_VERSION_MINOR_BELOW_78

0 commit comments

Comments
 (0)