Skip to content

Commit a303db7

Browse files
authored
fix: use install_modules_dependencies to fix compilation issues on RN 0.73 with Fabric (#308)
## 📜 Description Started to use `install_modules_dependencies` in `.podspec`. ## 💡 Motivation and Context It's vital to use `install_modules_dependencies` because it simplifies integration process (this function is shipped in RN, so RN team cares about internal deps that could be provided to the project). So it means that we don't need to specify it manually anymore and instead we can rely on the implementation provided by the package. However we need to keep in mind, that this function is available only from RN 0.71, so if we support RN < 0.71 we need to have fallback code. The other aspect that was discovered during the implementation is the fact that this function was broken on RN 0.72 + Swift + New Arch combination, but with latest RN release it's not broken anymore (that's the reason why I updated a RN dependency in this PR - to verify that it actually works as expected). Closes #371 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### JS - updated RN to 0.72.11 ### iOS - modified `.podspec` file to use `install_modules_dependencies` function. ## 🤔 How Has This Been Tested? Tested manually in reproduction example + via CI. ## 📝 Checklist - [x] CI successfully passed
1 parent c0931f8 commit a303db7

File tree

13 files changed

+1489
-1495
lines changed

13 files changed

+1489
-1495
lines changed

FabricExample/Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.12'
6+
gem 'cocoapods', '~> 1.13'
7+
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'

FabricExample/ios/KeyboardControllerFabricExample.xcodeproj/project.pbxproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@
572572
GCC_PREPROCESSOR_DEFINITIONS = (
573573
"DEBUG=1",
574574
"$(inherited)",
575+
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
575576
);
576577
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
577578
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -603,6 +604,10 @@
603604
"-DFOLLY_USE_LIBCPP=1",
604605
"-DRN_FABRIC_ENABLED",
605606
);
607+
OTHER_LDFLAGS = (
608+
"$(inherited)",
609+
" ",
610+
);
606611
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
607612
SDKROOT = iphoneos;
608613
};
@@ -644,6 +649,10 @@
644649
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
645650
GCC_C_LANGUAGE_STANDARD = gnu99;
646651
GCC_NO_COMMON_BLOCKS = YES;
652+
GCC_PREPROCESSOR_DEFINITIONS = (
653+
"$(inherited)",
654+
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
655+
);
647656
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
648657
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
649658
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -672,6 +681,10 @@
672681
"-DFOLLY_USE_LIBCPP=1",
673682
"-DRN_FABRIC_ENABLED",
674683
);
684+
OTHER_LDFLAGS = (
685+
"$(inherited)",
686+
" ",
687+
);
675688
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
676689
SDKROOT = iphoneos;
677690
VALIDATE_PRODUCT = YES;

0 commit comments

Comments
 (0)