React-native-code-push: [Feature Request] Uninstall update manually with sync()?

Created on 14 Nov 2018  路  3Comments  路  Source: microsoft/react-native-code-push

Our app has a hidden dev settings page where we can select deployment (prod/staging) or 'off'. We then use the sync function to get the updates depending on deployment key. If the app has received an update on production or staging, we want to be able to revert it when switching to 'off', is this possible? Can sync be used to rollback all updates? I haven't been able to find anything about this but it would be a neat feature!

Let me know if my question is confusing, thanks!

question

All 3 comments

Hi @cgerikj! We have a clearUpdates method (added in PR#1269):

  • clearUpdates: Clear all downloaded CodePush updates. This is useful when switching to a different deployment which may have an older release than the current package.

    _Note: we don鈥檛 recommend to use this method in scenarios other than that (CodePush will call this method automatically when needed in other cases) as it could lead to unpredictable behavior._

Please check if it's suitable for your case.

Thank you! This sounds exactly like what I need, will try tomorrow! :)

Edit: It works :) 馃憤

Cool! Thanks for using CodePush!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DeDuckProject picture DeDuckProject  路  3Comments

Fuhrmann picture Fuhrmann  路  3Comments

ACCTFORGH picture ACCTFORGH  路  3Comments

jaysig picture jaysig  路  3Comments

SudoPlz picture SudoPlz  路  4Comments