React-native-code-push: Clarification is needed!

Created on 1 Jun 2017  路  2Comments  路  Source: microsoft/react-native-code-push

Description

I would like to clarify on how code-push works:
1) I am trying to test code-push on a Staging version by switching a flag within the js code from true to false. However, after release-react, I am getting:
[Error] The uploaded package was not released because it is identical to the contents of the specified deployment's current release.
So my question is how does it know that the js bundle was updated? Should one specify somewhere the version code when he is releasing an update?
2) What happens if there was a "store" release with the same binary version but there is also a code-push release in prior (older version). Will code-push update the app to its own latest version, although it is de facto outdated or there is a way code-push knows bundle versioning stuff on its own somehow?

Thanks.

Additional Information

  • react-native-code-push version:
    ^2.0.3-beta
  • react-native version:
    0.44.0
  • iOS/Android/Windows version:
    Android
  • Does this reproduce on a debug build or release build?
    Release build
  • Does this reproduce on a simulator, or only on a physical device?
    Simulator
question waiting-for-clarification

All 2 comments

Hi @bogomazov, thanks for your question.

  1. Released package hash is compared with last package hash with same app version (Package hash is generated as a sorted array of key value pairs (one for each file in the release), of the format <relativeFilePath>: <SHA256HashOfFileContents> and then stringify this array and hash that to get a single directoryHash). So if you change file contents then new hash will be generated and code push consider this bundle is updated.
  2. Code push update will not be applied unless its target binary version is the same as the AppStore binary version. You can find some more explanation here.

Please let us know if it helps or you have more questions.

Hey @bogomazov, I believe we can close the issue if you have no more questions at this time, please do not hesitate to reach us if any other questions or if you see any issues with code push.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fuhrmann picture Fuhrmann  路  3Comments

kevando picture kevando  路  4Comments

SudoPlz picture SudoPlz  路  4Comments

fanzhiri picture fanzhiri  路  3Comments

ACCTFORGH picture ACCTFORGH  路  3Comments