Closed pierroo closed 8 months ago
Here's how you do it in kotlin:
override fun getJSBundleFile(): String {
return CodePush.getJSBundleFile()
}
So your MainApplication would look something like this:
// imports...
import com.microsoft.codepush.react.CodePush;
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper(
this,
object : DefaultReactNativeHost(this) {
// ...
// Add the CodePush getJSBundleFile method override
override fun getJSBundleFile(): String {
return CodePush.getJSBundleFile()
}
}
)
override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
// ...
}
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Steps to Reproduce
Expected Behavior
doc should reflect new changes from RN 0.73+ now using kotlin
Environment
To sum up, how are we supposed to translate the following from doc into kotlin?
import com.microsoft.codepush.react.CodePush;