Skip to content

Commit af358ac

Browse files
Merge pull request francisco-sanchez-molina#21 from krunalsshah/master
add createJSModules to support apps using react native < 0.47
2 parents fbd056b + 3b5400d commit af358ac

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

android/src/main/java/com/devialab/exif/RCTExifPackage.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.util.List;
66

77
import com.facebook.react.ReactPackage;
8+
import com.facebook.react.bridge.JavaScriptModule;
89
import com.facebook.react.bridge.NativeModule;
910
import com.facebook.react.bridge.ReactApplicationContext;
1011
import com.facebook.react.uimanager.ViewManager;
@@ -19,6 +20,15 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
1920
);
2021
}
2122

23+
// Do not annotate the method with @Override
24+
// This will provide backward compatibility for apps using react-native version < 0.47
25+
// Breaking change in react-native version 0.47 : Android Remove unused createJSModules calls
26+
// Find more information here : https://github.com/facebook/react-native/releases/tag/v0.47.2
27+
// https://github.com/facebook/react-native/commit/ce6fb337a146e6f261f2afb564aa19363774a7a8
28+
public List<Class<? extends JavaScriptModule>> createJSModules() {
29+
return Collections.emptyList();
30+
}
31+
2232
@Override
2333
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
2434
return Collections.emptyList();

0 commit comments

Comments
 (0)