FMPConnection.Builder

Description

The FMPConnection.Builder class is a builder for the FMPConnection class.

class Builder

Methods

Method Description

url(_:)

Save server URL to variable.
func url(_ url: String) -> Builder

Parameters:

  • url. Server URL.

environment(_:) Save environment name to variable.
func environment(_ environment: String) -> Builder

Parameters:

  • environment. Environment name.

project(_:) Save project name to variable.
func project(_ project: String) -> Builder

Parameters:

  • project. Project name.

udid(_:) Save unique device identifier to variable.
func udid(_ udid: String) -> Builder

Parameters:

  • udid. Unique device identifier.

api(_:) Save API version to variable.
func api(_ api: String) -> Builder

Parameters:

  • api. API version.

isSSLChecksEnabled(_:) It sets whether SSL/TLS server certificate check is enabled.
func isSSLChecksEnabled(_ isEnabled: Bool = true) -> Builder

Parameters:

  • isEnabled. If the value is true, SSL/TLS server certificate check is enabled.

caFilePath(_:) Save to variable the full path to pem file of certification authority certificate in application directory.
func caFilePath(_ path: String) -> Builder

Parameters:

  • path. The full path to pem file of the certification authority certificate in the application directory.

build() Build an instance of the FMPConnection class. It returns the object of the FMPConnection type.
func build() -> FMPConnection

Example

Build an instance of the FMPConnection class:

// Build an instance of the FMPConnection class with various settings
let connection: FMPConnection = fmp.connection
    .api("api") // By default "v1"
    .url("http://url/") // By default ""
    .environment("env") // By default ""
    .project("proj") // By default ""
    .udid("udid") // By default ""
    .isSSLChecksEnabled() // By default "false"
    .caFilePath("path") // By default ""
    .build()

See also:

FMPWrapper Framework | Classes