microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.95k stars 1.46k forks source link

Codepush download sucessfully but the bundle doesn't apply on ios only #2687

Closed phantrungviet98 closed 5 months ago

phantrungviet98 commented 6 months ago

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

  1. appcenter codepush release-react -a xxx -t 15..
  2. app received codepush and installed successfully
  3. codePush.getUpdateMetadata() returns correct bundle version, but actually the bundle doesn't apply

    Expected Behavior

    • the bundle apply correctly

Actual Behavior

codePush.getUpdateMetadata() return expected installed bundle but it doesn't apply

  STACK TRACE AND/OR SCREENSHOTS

Reproducible Demo

Environment

(The more info the faster we will be able to address it!)

phantrungviet98 commented 6 months ago

i just found that when i download the bundle using staging key it works, but production key it doesn't

djindal61 commented 6 months ago

I am also facing the same error.

phantrungviet98 commented 6 months ago

i tried to set Mandatory for the bundle, it works after the app reload automatically but after reopen the app next time, the bundle is gone. i guess it is not saved correctly ?

RuFang-21 commented 5 months ago

anyone have solution on this :(

phantrungviet98 commented 5 months ago

@djindal61 @RuFang-21

from my side just because we forgot to return [CodePush bundleURL];

full code there `- (NSURL )sourceURLForBridge:(RCTBridge )bridge

{

if DEBUG

return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

else

return [CodePush bundleURL];

endif

}`

amanthegreatone commented 5 months ago

pls check this i had this issue which was solved. https://github.com/microsoft/react-native-code-push/issues/2529#issuecomment-1968788585