Skip to content

Commit

Permalink
Updates Fabric Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubax committed Feb 15, 2022
1 parent 60632f7 commit eb3d555
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README-Fabric.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<UIManager> 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
```

0 comments on commit eb3d555

Please sign in to comment.