Skip to content

Commit

Permalink
fix: use install_modules_dependencies to fix compilation issues on …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
kirillzyusko committed Feb 28, 2024
1 parent c0931f8 commit a303db7
Show file tree
Hide file tree
Showing 13 changed files with 1,489 additions and 1,495 deletions.
3 changes: 2 additions & 1 deletion FabricExample/Gemfile
Expand Up @@ -3,4 +3,5 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.12'
gem 'cocoapods', '~> 1.13'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
Expand Up @@ -572,6 +572,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -603,6 +604,10 @@
"-DFOLLY_USE_LIBCPP=1",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -644,6 +649,10 @@
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down Expand Up @@ -672,6 +681,10 @@
"-DFOLLY_USE_LIBCPP=1",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down

0 comments on commit a303db7

Please sign in to comment.