Closed mrenann closed 3 weeks ago
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}
override fun getJSBundleFile(): String {
return CodePush.getJSBundleFile()
}
override fun getJSMainModuleName(): String = "index"
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
override fun onCreate() {
super.onCreate()
Fresco.initialize(this)
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
}
}
Hello @mrenann thank you for reaching out! I see you are using new arch you could try this workaround https://github.com/microsoft/react-native-code-push/issues/2083#issuecomment-1411745157 and see if it works for you. If not i suggest not use new arch as we don't support it, i belive you can still opt out from it.
Hello :) Thanks for the help I looked, but I didn't quite understand where I should put it, I'll try to send a message there to understand
I understand, but you can always disable new arch since as i said this is a workaround and we don't plan on supporting new arch for react-native-code-push.
Closing due inactivity.
LIBS:
react-native-code-push": "^9.0.0
react-native": "0.75.4
I have two flavors
And have activacted new Arch and using Hermes
LOGS: