---
title: "init(_:_:)"
framework: network
role: symbol
role_heading: Initializer
path: "network/ipaddress/init(_:_:)"
---

# init(_:_:)

Initializes an IP address with data.

## Declaration

```swift
init?(_ rawValue: Data, _ interface: NWInterface?)
```

## Discussion

Discussion The provided data is expected to be either an IPv4 address of 4 bytes or an IPv6 address of 16 bytes.

## See Also

### Creating Addresses

- [init(_:)](network/ipaddress/init(_:).md)
