SDKs
...
Tutorials
Best Practices

Handling Product Versions

8min
product versioning empowers vendors to introduce fresh iterations of their licensed products, fostering increased customization this article serves to educate readers on a range of topics, including defining and retrieving application versions, implementing conditional update checks within maintenance windows, validating product versions during license checks, and other relevant insights prerequisites completed the getting started tutorials, specifically initialized licensemanager (or licensehandler) with your configuration using the appropriate settings activated a license defining app version setting application version is completed within the configuration constructor, as shown below std shared ptr\<configuration> pconfiguration = configuration create( encryptstr( "xxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxx" ), encryptstr( "xxxxxxxxx xxxxx xxxxxxxxxxxxx xxxxxx xxxxxx" ), encryptstr( "xxxxxx" ), appname, appversion, options );var configuration = new licensespring configuration( apikey "xxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxx", sharedkey "xxxxxxxxx xxxxx xxxxxxxxxxxxx xxxxxx xxxxxx", productcode "product short code", appname "my application", appversion "v5 2" );licensespringconfiguration configuration = licensespringconfiguration builder() apikey( "xxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxx" ) productcode( "javaproduct" ) sharedkey( "xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx" ) appname( "name" ) appversion( "version" ) build();let configuration = configuration( apikey "xxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxx", sharedkey "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", productcode "xx" ) configuration appname = "my licensespring application" configuration appversion = "1 0 0"import licensespring licensespring app version = "myapp 1 0 0" the fifth parameter passed, appversion , is where the version is set for the application from here, current app version can be accessed with appversion = pconfiguration >getappversion();appversion = pconfiguration appversion();appversion = pconfiguration getappversion();configuration appversion to access a list of all available product versions, we can use getversionlist() from the licensemanager object acquiring a vector of strings containing all versions is done with listversions = licensemanager >getversionlist( licenseid );listversions = licensemanager getallversions( licenseid );listversions = licensemanager getversions( licenseidentity );let versions = try license requestavailableversions() // \[availableversion] response = manager get version list(license id=license id) retrieving installation files getting latest installation file during online license check to confirm the latest product version during a license check, we'll construct an installationfile object and assign it the value obtained from license >check() as license >check() furnishes the most recent installationfile associated with the license, we can subsequently access the version information by executing installationfile ptr t ins = license >check(); std string version = ins >version();installationfile ptr t ins = license check(); std string version = ins version();try license fullcheck() if let installationfile = license installationfile { } getting all installation files developers can also retrieve the latest installationfile releases through the licensemanager object through use of the licenseid as follows licensemanager >getinstallationfile( licenseid );licensemanager getinstallationfile( licenseid );licensemanager getinstallationfile( licenseidentity );let specificversion = try license requestinstallationfile(version "x y z")response = manager get installation file(license id=license id) print(response) note the c++ getinstallationfile() method has two additional, optional parameters the second parameter is to declare a desired product version, if not provided then the last available version will be assumed the third parameter is a installfilefilter object that can be used to filter install files by environment and channel the net sdk has one additional parameter, an installationfileoptions object that can be used to filter install files by channel or environment, as well as the needed version exceptions called if an installation file is not found for requested app version c++ productversionexception net appversionnotfoundexception java licensespringexception installationfile class overview and intermediate updates the installationfile class holds crucial information about a product's installation file it captures details about the product installer or setup file uploaded via the licensespring platform or management api, facilitating efficient product versioning and management installation files can be used to regulate intermediate updates through accessing the required app version to complete the update an intermediate update denotes an update that mandates a specific version of the predictor to be presently installed you can verify the necessary version by utilizing installationfile as follows requiredversion = installationfile >requiredversion();requiredversion = installationfile >requiredversion();if let requiredversion = installationfile requiredversion { }