« Back to Product

Documentation

IPS_GetAvailableUpdates

 array IPS_GetAvailableUpdates ()

Returns

Array with at most one entry. If no newer version is available, the array is empty. Each entry contains the following key => value pairs:

Index Type Description
Build integer Build number of the available version
Channel string Update channel in which the version was found (stable, beta, testing)
Date integer Unix timestamp of the release
Version string Version number of the available version, e.g. "8.1"

Description

The function checks whether a newer version of Symcon is available for the currently configured update channel (IPS_GetUpdateChannel). For this, the package list of the own platform (IPS_GetKernelPlatform) and architecture is fetched from the update server (apt.symcon.de); an internet connection is therefore required.

Only the newest published version of the channel is considered. It counts as available if its version number (major/minor compared numerically) is greater than the installed one (IPS_GetKernelVersion) or, for the same version number, if its build number is greater. In this case the result contains exactly one entry, otherwise it is empty.

The platforms SymBox, Windows, Ubuntu, Raspberry Pi, Mac, Catan C1 and Docker are supported. On other platforms, the function fails with "Updates cannot be detected for this platform!". On a development version (platform "Unknown"), an empty array is always returned. If the update server cannot be reached or the package list cannot be read, the function fails with a corresponding error.

Example

$updates = IPS_GetAvailableUpdates();
if (count($updates) == 0) {
    echo "Symcon is up to date";
} else {
    print_r($updates);
}

/* e.g. returns:
Array
(
    [0] => Array
        (
            [Build] => 1234
            [Channel] => stable
            [Date] => 1757412000
            [Version] => 8.1
        )
)
*/
Any questions?