FMLiveSwitchVersion Class Reference

SDK Version. More...

Instance Methods

(NSString *) - description
 Returns a string representation of this version. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchVersion class with default values. More...
 
(instancetype) - initWithVersionString:
 Initializes a new instance of the FMLiveSwitchVersion class with the specified version string. More...
 
(bool) - isEqualToWithVersion:
 Determines whether this version is equal to the specified version. More...
 
(bool) - isNewerThanOrEqualToWithVersion:
 Determines whether this version is newer than or equal to the specified version. More...
 
(bool) - isNewerThanWithVersion:
 Determines whether this version is newer than the specified version. More...
 
(bool) - isOlderThanOrEqualToWithVersion:
 Determines whether this version is older than or equal to the specified version. More...
 
(bool) - isOlderThanWithVersion:
 Determines whether this version is older than the specified version. More...
 
(int) - major
 Gets the major version number. More...
 
(int) - minor
 Gets the minor version number. More...
 
(int) - patch
 Gets the patch version number. More...
 
(int) - revision
 Gets the revision version number. More...
 
(void) - setMajor:
 Sets the major version number. More...
 
(void) - setMinor:
 Sets the minor version number. More...
 
(void) - setPatch:
 Sets the patch version number. More...
 
(void) - setRevision:
 Sets the revision version number. More...
 
(NSString *) - stringify
 Returns a string representation of this version. More...
 

Class Methods

(FMLiveSwitchVersion *) + parseWithVersionString:
 Converts the string representation of a version to its FMLiveSwitchVersion equivalent. More...
 
(bool) + tryParseWithVersionString:version:
 Tries to convert the string representation of a version to its FMLiveSwitchVersion equivalent, and returns a value that indicates whether the conversion succeeded. More...
 
(FMLiveSwitchVersion *) + version
 Initializes a new instance of the FMLiveSwitchVersion class with default values. More...
 
(FMLiveSwitchVersion *) + versionWithVersionString:
 Initializes a new instance of the FMLiveSwitchVersion class with the specified version string. More...
 

Detailed Description

SDK Version.

Method Documentation

◆ description

- (NSString*) description

Returns a string representation of this version.

Returns
A string representation of this version in the format "major.minor.patch.revision".

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchVersion class with default values.

◆ initWithVersionString:

- (instancetype) initWithVersionString: (NSString *)  versionString

Initializes a new instance of the FMLiveSwitchVersion class with the specified version string.

Parameters
versionStringA string representation of the version in the format "major.minor.patch.revision".

◆ isEqualToWithVersion:

- (bool) isEqualToWithVersion: (FMLiveSwitchVersion *)  version

Determines whether this version is equal to the specified version.

Parameters
versionThe version to compare with this version.
Returns
true if the versions are equal; otherwise, false.

◆ isNewerThanOrEqualToWithVersion:

- (bool) isNewerThanOrEqualToWithVersion: (FMLiveSwitchVersion *)  version

Determines whether this version is newer than or equal to the specified version.

Parameters
versionThe version to compare with this version.
Returns
true if this version is newer than or equal to the specified version; otherwise, false.

◆ isNewerThanWithVersion:

- (bool) isNewerThanWithVersion: (FMLiveSwitchVersion *)  version

Determines whether this version is newer than the specified version.

A development version (0.0.0.0) is considered newer than all other versions except another development version.

Parameters
versionThe version to compare with this version.
Returns
true if this version is newer than the specified version; otherwise, false.

◆ isOlderThanOrEqualToWithVersion:

- (bool) isOlderThanOrEqualToWithVersion: (FMLiveSwitchVersion *)  version

Determines whether this version is older than or equal to the specified version.

Parameters
versionThe version to compare with this version.
Returns
true if this version is older than or equal to the specified version; otherwise, false.

◆ isOlderThanWithVersion:

- (bool) isOlderThanWithVersion: (FMLiveSwitchVersion *)  version

Determines whether this version is older than the specified version.

A development version (0.0.0.0) is not considered older than any other version.

Parameters
versionThe version to compare with this version.
Returns
true if this version is older than the specified version; otherwise, false.

◆ major

- (int) major

Gets the major version number.

◆ minor

- (int) minor

Gets the minor version number.

◆ parseWithVersionString:

+ (FMLiveSwitchVersion*) parseWithVersionString: (NSString *)  versionString

Converts the string representation of a version to its FMLiveSwitchVersion equivalent.

Parameters
versionStringA string representation of the version to parse.
Returns
A FMLiveSwitchVersion object equivalent to the version contained in , or null if the conversion failed.

◆ patch

- (int) patch

Gets the patch version number.

◆ revision

- (int) revision

Gets the revision version number.

◆ setMajor:

- (void) setMajor: (int)  value

Sets the major version number.

◆ setMinor:

- (void) setMinor: (int)  value

Sets the minor version number.

◆ setPatch:

- (void) setPatch: (int)  value

Sets the patch version number.

◆ setRevision:

- (void) setRevision: (int)  value

Sets the revision version number.

◆ stringify

- (NSString*) stringify

Returns a string representation of this version.

Returns
A string representation of this version in the format "major.minor.patch.revision".

◆ tryParseWithVersionString:version:

+ (bool) tryParseWithVersionString: (NSString *)  versionString
version: (FMLiveSwitchVersion **)  version 

Tries to convert the string representation of a version to its FMLiveSwitchVersion equivalent, and returns a value that indicates whether the conversion succeeded.

Parameters
versionStringA string representation of the version to parse.
versionWhen this method returns, contains the FMLiveSwitchVersion equivalent of the version contained in , if the conversion succeeded, or null if the conversion failed.
Returns
true if was converted successfully; otherwise, false.

◆ version

+ (FMLiveSwitchVersion*) version

Initializes a new instance of the FMLiveSwitchVersion class with default values.

◆ versionWithVersionString:

+ (FMLiveSwitchVersion*) versionWithVersionString: (NSString *)  versionString

Initializes a new instance of the FMLiveSwitchVersion class with the specified version string.

Parameters
versionStringA string representation of the version in the format "major.minor.patch.revision".