FloatingClient

@objc
class FloatingClient
extension FloatingClient : CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Equatable, Hashable, NSObjectProtocol

Undocumented

  • Undocumented

    Declaration

    Swift

    @objc
    let configuration: Configuration
  • Init FloatingClient with configuration.

    Throws

    LSError if input configuration is wrong.

    Declaration

    Swift

    @objc
    init(configuration: Configuration) throws
  • Filesystem path to the license.

    Declaration

    Swift

    @objc
    var licenseFile: URL { get }
  • Activated License or nil if no license is active.

    Declaration

    Swift

    @objc
    var currentLicense: License? { get }
  • Register client with given id.

    Send register license request to the Floating server.

    Throws

    LSError if registration fails.

    Declaration

    Swift

    @objc
    func register(userID: String) throws -> License

    Parameters

    userID

    User or instance id for license registration, it can be anything - email, host or domain name, handle, etc.

    Return Value

    Shared pointer to License if registration succeeded, throws exceptions in case of errors.

  • Unregister client with given id.

    Throws

    LSError if unregistration fails.

    Declaration

    Swift

    @objc
    func unregister(userID: String) throws
  • Remove license file and internal SDK files if any of them exist.

    Note

    Typically should be called after license deactivation in the app uninstaller.

    Throws

    Error if clearing fails.

    Declaration

    Swift

    @objc
    func clearLocalStorage() throws
  • Helper method to check connection to the Floating server.

    Declaration

    Swift

    @objc
    func checkConnection() -> Bool

    Return Value

    true if SDK is able to connect to the Floating server and false otherwise.