NativeScript / nativescript-app-sync

♻️ Update your app without going through the app store!
MIT License
125 stars 24 forks source link

Feature Request: Version label in the Sync success callback #23

Closed shiv19 closed 5 years ago

shiv19 commented 5 years ago

I've noticed that all the app-sync updates get published with a label v1, v2, v3.. and so on, it would be nice to receive this label as the 2nd parameter on the AppSync.sync()'s success callback.

AppSync.sync({ ... }, (syncStatus, updateLabel) => {
  if (syncStatus === SyncStatus.UP_TO_DATE) {
    console.log("AppSync: up to date", updateLabel);
  } else if (syncStatus === SyncStatus.UPDATE_INSTALLED) {
    console.log("AppSync: update installed", updateLabel);
  }
});

If not, it would be nice to let the developer pass a version tag during the release that gets returned here.

EddyVerbruggen commented 5 years ago

Great idea! The reason it's not there is because of API compatibility with Microsoft CodePush, but an optional second param won't hurt.

shiv19 commented 5 years ago

Wow, that was quick 😍😍 Thank you!

EddyVerbruggen commented 5 years ago

You're welcome. Trying to keep you going with testing this baby 👶.. 🤣