Programmatically Check pocketbase version #2993
-
|
Is there a way to find out what version of pocketbase is running from the SDKs? This would be useful to ask users to update their mobile app if the server gets updated and makes the mobile app incompatible |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
We don't have web API that output the version at the moment (it exists in my todo so that we can also make the version in the Admin UI dynamic, but remains a very low priority as there are some complications around the versions when PocketBase is used as framework).
Even if there was a version API I'm not sure that I understand how do you plan to implement the check, because your app will need to have upfront information what are the supported PocketBase versions, meaning that with each new PocketBase release you'll have to force your users to update your application even if there isn't a breaking change in the latest PocketBase version. Ideally once we reach a stable v1 there will be no more breaking changes and you wouldn't have to worry about this, but a better approach maybe could be to have a collection with some sort of flags based on which you'll either have a custom mobile app handling OR some custom code when used as framework that will perform the backward compatibility checks/fallbacks. |
Beta Was this translation helpful? Give feedback.
-
|
You can query the github api with your program and get a json response, I think this is kind of what you want? |
Beta Was this translation helpful? Give feedback.
We don't have web API that output the version at the moment (it exists in my todo so that we can also make the version in the Admin UI dynamic, but remains a very low priority as there are some complications around the versions when PocketBase is used as framework).
Even if there was a version API I'm not sure that I understand how do you plan to implement the check, because your app will need to have upfront information what are the supported PocketBase versions, meaning that with each new PocketBase release you'll have to force your users to update your applica…