---
title: "init(_:)"
framework: wifiaware
role: symbol
role_heading: Initializer
path: "wifiaware/washaredsecret/context/init(_:)-74fai"
---

# init(_:)

Creates a new custom context that provides unique data.

## Declaration

```swift
init?(_ data: Data)
```

## Parameters

- `data`: The data to use as the underlying context, which must be greater than or equal to 3 bytes long.

## Return Value

Return Value A new Context, or nil if the provided string was too short.

## Discussion

Discussion Custom contexts may use any data. Set the same byte value on the local and remote devices in order to generate the same shared secret.
