File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,19 @@ const withAndroidMainApplicationDependency = (config) => {
6868 if ( action . modResults . contents . includes ( RN_082_MARKER ) ) {
6969 action . modResults . contents = addJsBundleFilePathArgument ( action . modResults . contents ) ;
7070 } else {
71+ // https://github.com/Soomgo-Mobile/react-native-code-push/issues/97
72+ const isExpoSDK54 = config . sdkVersion ?. startsWith ( '54.' ) ?? false ;
73+ const addingCode = isExpoSDK54
74+ ? ' override fun getJSBundleFile(): String {\n' +
75+ ' CodePush.getInstance(applicationContext, BuildConfig.DEBUG)\n' +
76+ ' return CodePush.getJSBundleFile()\n' +
77+ ' }\n'
78+ : ' override fun getJSBundleFile(): String = CodePush.getJSBundleFile()\n' ;
7179 action . modResults . contents = androidMainApplicationApplyImplementation (
7280 action . modResults . contents ,
7381 'object : DefaultReactNativeHost(this) {' ,
74- ' override fun getJSBundleFile(): String = CodePush.getJSBundleFile()\n' ) ;
82+ addingCode ,
83+ ) ;
7584 }
7685 }
7786
You can’t perform that action at this time.
0 commit comments