CodePush updating a newly installed app

Viewed 1057

I am setting up code-push for my app and found a weird behaviour. I compiled the app for staging and installed it on the android phone and then pushed some updates through code-push which were downloaded fine.

I am not changing the versions of my apk in android/app/build.gradle since i am installing directly from the mac to the phone for testing in staging mode and it overrides the previous installation.

I keep track of the bundle-id for bugsnag and the last bundle-id for code-push is 1.6.5. After some more modifications I ended up creating a new apk for staging that was installed and now the bundle-id is 1.6.7. I haven't pushed this to code-push yet. As soon as the app runs it asks for an update and if I update i get the old bundle (bundle-id 1.6.5) from code-push. Not able to understand why i will get old code as an update. Am i not setting some parameter correctly?

react-native: 0.44.1

react-native-code-push: 2.1.1-beta

1 Answers

You have to push the package to code push and make it available for 1.6.7 version so that it downloads the new package instead of the old one. You can make the release mandatory and tell code push to download it and update it on next resume like so codePush({ checkFrequency: codePush.CheckFrequency.ON_APP_RESUME, installMode: codePush.InstallMode.ON_NEXT_RESUME })

Related