# TyroEnvironment

The environment in which the SDK gets initialised with. It is required to create an instance of `TyroTapToPay`.

Also see [ConnectionProvider](/pos/embedded-payments/iphone/sdk/connection-provider).

## TyroEnvironment.sandbox

This is used to test in a sandbox environment.


```swift
let tyroTapToPaySDK = try TyroTapToPay(environment: .sandbox, connectionProvider: connectionProvider)
```

### Parameters


```json
{
  "type": "object",
  "properties": {
    "environment": {
      "type": "TyroEnvironment",
      "description": "Environment the SDK will be running in."
    },
    "connectionProvider": {
      "type": "ConnectionProvider",
      "description": "Your class that implements the Connection Provider interface which makes a call to your server to fetch the `connectionSecret`."
    }
  },
  "required": [
    "environment",
    "connectionProvider"
  ]
}
```

## TyroEnvironment.prod

This is used for production.


```swift
let tyroTapToPaySDK = try TyroTapToPay(environment: .prod, connectionProvider: connectionProvider)
```

### Parameters


```json
{
  "type": "object",
  "properties": {
    "environment": {
      "type": "TyroEnvironment",
      "description": "Environment the SDK will be running in."
    },
    "connectionProvider": {
      "type": "ConnectionProvider",
      "description": "Your class that implements the Connection Provider interface which makes a call to your server to fetch the `connectionSecret`."
    }
  },
  "required": [
    "environment",
    "connectionProvider"
  ]
}
```