One Logo Pool Ball
WiFiAware · IOS API REFERENCE

WASharedSecret.Context

struct · iOS 26.4+ · SDK 27.1

struct Context

A unique value that is specific to your App and the use case a given connection will perform, which diversifies the generated secret so that it is unique to your App and connection.

Members (3)

get · iOS 26.4+

bundleID

TypeScript
static get bundleID(): WASharedSecret_Context
Swift declaration
static let bundleID: WASharedSecret.Context

Use your App's bundle ID as the context (default).

init · iOS 26.4+

init

TypeScript
static init(data: ArrayBuffer): (WASharedSecret_Context) | null
Swift declaration
init?(_ data: Data)

Create a new custom context, providing unique data for the context. Custom context may use any data. The exact same byte value must be set on both the local and remote devices for the same shared secret to be generated. - Parameter data: The data to use as the underlying context, which must be >= 3 bytes long. - Returns: A new Context, or `nil` if the provided string was too short.

init · iOS 26.4+

init

TypeScript
static init37833(string: string): (WASharedSecret_Context) | null
Swift declaration
init?(_ string: String)

Create a new custom context, providing a unique string for the context. Custom context may use any string that can be represented as UTF-8, and which normalizes to the same value when represented as bytes. ASCII-compatible values are recommended to avoid normalization issues. The exact same value must be set on both the local and remote devices for the same shared secret to be generated. - Parameter string: The string to use as the underlying context, which must be >= 3 characters long. Will be converted to `UTF-8` prior to being hashed in the derivation. - Returns: A new Context, or `nil` if the provided string was too short.

Skipped declarations

No declarations were skipped in this snapshot.

All WiFiAware types →