Protocols

The following protocols are available globally.

AudioConfigurationProvider

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol AudioConfigurationProvider
  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol Event

GeoJSON

  • Common protocol for every geometry type.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol GeoJSON : Decodable
  • Represents point of the route received in response from route planning API

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol RoutePoint

GPXParserProtocol

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol GPXParserProtocol

TTPParserProtocol

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol TTPParserProtocol : AnyObject

LoggerOutput

  • LoggerOutput - Shall be used to create custom log outputs like, file or cloud.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol LoggerOutput
  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol MapId
  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol MapReferences
  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol RegionId
  • Map tile provider interface for map display.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol MapTileDataProvider : AnyObject

HTTPHandlerRequestProtocol

  • HTTPHandlerRequestProtocol declares method required to send http request.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol HTTPHandlerRequestProtocol

HTTPHandlerResponseDecoder

  • HTTPHandlerResponseDecoder allows Data be decoded into the given T.Type.

    Example:

    class JSONResponseDecoder: HTTPHandlerResponseDecoder {
        public func decode<T>(_ type: T.Type, from data: Data) throws -> T where T: Decodable {
            let jsonDecoder = JSONDecoder()
            return try jsonDecoder.decode(type, from: data)
        }
    }
    
    

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol HTTPHandlerResponseDecoder

HTTPRequestBodyCreator

  • HTTPRequestBodyCreator allows HTTPHandlerRequestProtocol to be mapped to Data that will be injected into an http request body.

    Example:

    public class JSONBodyCreator: HTTPRequestBodyCreator {
        public init() {}
    
        public func buildBody(request: HTTPHandlerRequestProtocol) throws -> Data? {
            guard let parameters = request.parameters(), request.method() != "GET" else { return nil }
            return parameters.jsonData()
        }
    }
    
    

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol HTTPRequestBodyCreator

HTTPHandlerProtocol

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol HTTPHandlerProtocol : AnyObject

AdditionalQueryItemProvider

  • AdditionalQueryItemProvider allows an additional URLQueryItem to be injected into an HTTPHandlerRequestProtocol.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol AdditionalQueryItemProvider : AnyObject

NetworkMonitorProtocol

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol NetworkMonitorProtocol

QueryItemConvertible

  • QueryItemConvertible allows Any become a URLQueryItem

    Example:

    “``extension String: QueryItemConvertible { public func queryItem(key: String) -> URLQueryItem? { .init(name: key, value: self) } }

    - Important: This is a Public Preview API. It may be changed or removed at any time.
    

    Declaration

    Swift

    public protocol QueryItemConvertible

QueryItemArrayConvertible

  • QueryItemConvertible allows Any become an array of URLQueryItems

    Example that allows an array of SectionTypes become an array of URLQueryItems

    extension SectionType: QueryItemConvertible {
        public func queryItem(key: String) -> URLQueryItem? {
            guard let value = value else { return nil }
            return .init(name: key, value: value)
        }
    }
    
    extension Array: QueryItemArrayConvertible where Element == SectionType {
        public func queryItems(key: String) -> [URLQueryItem]? {
            guard count > 0 else { return nil }
            return compactMap { $0.value }.map { URLQueryItem(name: key, value: $0) }
        }
    }
    
    

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol QueryItemArrayConvertible
  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol SecureRequestProtocol

DistanceRangeFormatterProtocol

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol DistanceRangeFormatterProtocol

FormattingRanges

  • Provides information about what conversion parameters should be used for input value within a specific range

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol FormattingRanges

Observer

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol Observer : AnyObject

ObservableProtocol

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol ObservableProtocol