Closed terryatgithub closed 1 month ago
oh yea, we just got it on our prod, errors after upgrading to RN 72, so its possibly coming from this lib?
we referred this comment https://github.com/facebook/react-native/issues/36048#issuecomment-1456157287
our solution code as below for reference
private final ReactNativeHost mReactNativeHost =
new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return getPackageFromMainFeature();
}
@Override
protected String getJSMainModuleName() {
return "index";
}
+ @Override
+ protected @Nullable JavaScriptExecutorFactory getJavaScriptExecutorFactory() {
+ // because ReactNativeHost is overriden here, specify the HermesExecutorFactory():
+ // refer: https://github.com/facebook/react-native/issues/36048#issuecomment-1456157287
+ return new HermesExecutorFactory();
+ }
@Override
protected boolean isNewArchEnabled() {
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
}
@Override
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
Hi! ๐ Firstly, thanks for your work on this project! ๐
issue descriptions since this statement https://github.com/react-native-push-notification/ios/blob/904a99fdfa54f25b41c0a5141b4342b8c67b9616/android/app/build.gradle#L79
would cause a crash issue in Android like this: couldn't find DSO to load: libhermes.so
potential solution
would you consider fixing it, as the react-native official recommendation here: https://github.com/facebook/react-native/blob/7ea7d946c643f076c29bcf11b927f7569e3c516f/react.gradle#L18
my trial solutions(still under testing)
Today I used patch-package to patch
@react-native-community/push-notification-ios@1.8.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
if any misunderstanding please let me know, thank you so much.