Hello,
I'm using react-native in an hybird way for our ios app.
After integrated code-push, we found that, If enter the react-native page, we must wait until the upgrade was finished (request, download package and report succ).
For example, we enter the react-native page, and the download was started but not finished.
If we exit react-native page and back to native part of app, the downoload request wounld finished, but no report request would sent, nor did the js bundle update success.(It will redownload again in next time enter react-native page).
Is there anyway I can do to fix this situation?
Thank you.
(The more info the faster we will be able to address it!)
@liheyuan, could you maybe provide a very basic sample that demonstrates the problem?
@vladimir-kotikov
Please forgive me for my poor english, React Native was used as hybird mode in our app, which means some page is made up of Native(Objective C), and other made up of React Native.
e.g.
I have page A (Native) and B (React Native)
When click button on A, B will be pushed to top of screen.
Then it will start downloading bundle if have new on CodePush Server.
But before it is finished, user may cancel page B and return to page A.
Currently, the download and update or React Native bundle would not successfully because the exit of B.
It will redownload the bundle again when the user enter page B nexttime.
I just wonder if there is any way we could made this situation possible, because it's very common for switch between native and rn page in hybird mode usage of react-native
e.g.
1) Made the download and upgrade successful even after React Native exit
2) Provide an API at the native side that could download RN Bundle in background Thread.
Thank you.
@liheyuan The code push bundles are updated in the acquisition SDK. This is a JavaScript file that runs only when React Native is running. If React Native's JSC VM is halted, this will also halt unfortunately.
I am not sure if there is a way around it. We are currently exploring the possibility of downloading the bundle in a background thread.
cc @silhouettes - here is a request for a background thread download for our bundle.
@liheyuan I have added the request to support background threads to our backlog. Hence closing this issue, since the current capabilities do not support this scenario.
Is there any update on this issue?
Most helpful comment
Is there any update on this issue?