iOS network options

Last updated: October 15, 2024

This topic describes how to configure network and security options.

To display options that are applicable to your environment, select a version of the iOS SDK:

Option type Option name Description Default Example
Certificates

options.certificates

 

Optionally supply certificates used for pinning. If you are using a reverse proxy you may need to provide your own certificates. iProov certificate pinning is enabled by default.

Certificates can only be passed as  Data.

Enabled

options.certificates = [try! Data(contentsOf: URL(fileURLWithPath: Bundle.main.path(forResource: "certificate", ofType: "der")!))]

Or from Base64:

options.certificates = Data(base64Encoded: "...")

Timeout options.timeout

Network timeout applied to the WebSocket connection (specified in seconds).

10 options.timeout= 25
Certificates

options.network.certificates

 

Optionally supply certificates used for pinning. If you are using a reverse proxy you may need to provide your own certificates. iProov certificate pinning is enabled by default.

Certificates should be passed as one of the following:

  • An array of String paths to the certificates in the bundle.

  • An array of Data types (the certificates themselves).

Enabled options.network.certificates = [Bundle.main.path(forResource: "custom_cert", ofType: "der")!]
Timeout options.network.timeout

The streaming timeout specified in seconds.

Caution should be taken when changing the default.

10 options.network.timeout = 20

Network Path (Socket IO)

options.network.path

Specifies the path to use when streaming.

Do not change unless instructed by iProov.

"/socket.io/v2/" options.network.path = "/socket.io/v2/"

Next step

Configure the presentation delegate