ModuleFunction
open class ModuleFunction
Defines a function to be included in a Geotab module’s Javascript API. Intended for internal Drive and MyGeotab use.
-
Declaration
Swift
public let moduleName: String -
Declaration
Swift
public let name: String -
Declaration
Swift
public init(module: Module, name: String)Parameters
moduleModule. The module this function should reside in.
nameString. Name of the Javascript function defined.
-
Declaration
Swift
public func validateAndDecodeJSONObject<T>(argument: Any?, jsCallback: @escaping (Result<String, any Error>) -> Void, decodeType: T.Type) -> T? where T : Decodable -
Declaration
Swift
open func handleJavascriptCall(argument: Any?, jsCallback: @escaping (Result<String, any Error>) -> Void)