From eb3d555c0660bb04ac457929931be7d1855058f4 Mon Sep 17 00:00:00 2001 From: Ubax Date: Tue, 15 Feb 2022 09:55:01 +0200 Subject: [PATCH] Updates Fabric Readme --- README-Fabric.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README-Fabric.md b/README-Fabric.md index fd6308e70e..67448f9b68 100644 --- a/README-Fabric.md +++ b/README-Fabric.md @@ -5,5 +5,24 @@ To use this library with your fabric application, you have to: 2. on iOS - Install pods using `RCT_NEW_ARCH_ENABLED=1 pod install` (iOS only) 3. on Android - - Similar to [this change](https://github.com/software-mansion/react-native-screens/pull/1263/files#diff-3b92f5f55f60a7bb92c779ec84a6608d0d53fb4009de9ec054d9da0698f5645a) add `import com.swmansion.rnscreens.RNScreensComponentRegistry;` and `RNScreensComponentRegistry.register(componentFactory);` to `ReactNativeHost` in your Application. - - Add `librnscreens_modules` to app Android.mk. Similar to [this](https://github.com/software-mansion/react-native-screens/pull/1308/files#diff-a6880655dffeac0a41f51b542a9bf126174bfd1f44963ec877a39ccca69c1fe6L45-R48) and [this](https://github.com/software-mansion/react-native-screens/pull/1308/files#diff-a6880655dffeac0a41f51b542a9bf126174bfd1f44963ec877a39ccca69c1fe6R8) changes. + - In `ReactNativeHost` in your Application (for react native 0.68 template it is in `android/app/src/main/java/com/YOUR_APP_NAME/newarchitecture/MainApplicationReactNativeHost.java`) add + ```diff + import com.fabricexample.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; + + import com.swmansion.rnscreens.RNScreensComponentRegistry; + ... + public JSIModuleProvider getJSIModuleProvider() { + ... + MainComponentsRegistry.register(componentFactory); + + RNScreensComponentsRegistry.register(componentFactory); + ``` + - In your app `Android.mk` (for react native 0.68 template it is in `android/app/src/main/jni/Android.mk`) add + ```diff + + include $(REACT_ANDROID_DIR)/../../react-native-screens/android/src/main/jni/Android.mk + include $(CLEAR_VARS) + ... + LOCAL_SHARED_LIBRARIES := libjsi \ + ... + - libyoga + + libyoga \ + + librnscreens_modules + ```