<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEIPv6Settings/init(addresses:networkPrefixLengths:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEIPv6Settings(im)initWithAddresses:networkPrefixLengths:"
  },
  "title" : "init(addresses:networkPrefixLengths:)"
}
-->

# init(addresses:networkPrefixLengths:)

Initializes the IPv6 settings object.

```
init(addresses: [String], networkPrefixLengths: [NSNumber])
```

## Parameters

`addresses`

An array of IPv6 address strings. These IPv6 addresses will be assigned to the tunnel’s TUN interface.

`networkPrefixLengths`

An array of IPv6 network prefix lengths. Each prefix length in this array is combined with the IP address in the corresponding index in `addresses` to specify an IPv6 network that the TUN interface is (virtually) connected to. Each prefix length must be set to an integer between 0 and 128.

## Return Value

The initialized `NEIPv6Settings` object.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)