Skip to content

Commit 8b10517

Browse files
committed
Add compat for old versions of react-native (with turbomodules)
1 parent 8ea378c commit 8b10517

File tree

7 files changed

+508
-476
lines changed

7 files changed

+508
-476
lines changed

android/src/main/java/io/swan/rnbrowser/RNSwanBrowserPackage.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ public NativeModule getModule(String name, @NonNull ReactApplicationContext reac
2828
public ReactModuleInfoProvider getReactModuleInfoProvider() {
2929
return () -> {
3030
final Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
31+
boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
3132

3233
ReactModuleInfo moduleInfo = new ReactModuleInfo(
3334
RNSwanBrowserModuleImpl.NAME,
3435
RNSwanBrowserModuleImpl.NAME,
3536
false,
3637
false,
38+
true,
3739
false,
38-
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
40+
isTurboModule
3941
);
4042

4143
moduleInfos.put(RNSwanBrowserModuleImpl.NAME, moduleInfo);

0 commit comments

Comments
 (0)