Prince of Versions is a library used by mobile API clients to determine the available application versions. It can see if there is an update available or if the client has an outdated application still running on their device.
Prince of Versions contains the minimum and the latest version of the application that is suitable to use with the current API server. It is useful for mobile clients when mandatory updates are required due to security purposes or API incompatibilities.
The library contacts the server requesting the file with the version information. It is used only in production, since we keep our staging builds on Infinum Labs.
Our current convention for naming that file is
The file should live in the
public folder since it's only a JSON file and there's no business logic behind it.
Use these contents when you're creating the file. The mobile team will contact you when you should upgrade a mobile SDK version.
You should always validate the
mobile-versions.json file after making a change (https://jsonlint.com/) and before
pushing the change and deploying it to production.