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!
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!