<!--
{
  "availability" : [
    "iOS: 7.0.0 - 27.0.0",
    "iPadOS: 7.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.10.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NetService/includesPeerToPeer",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSNetService(py)includesPeerToPeer"
  },
  "title" : "includesPeerToPeer"
}
-->

# includesPeerToPeer

Specifies whether to also publish, resolve, or monitor this service over peer-to-peer Bluetooth and Wi-Fi, if available.

```
var includesPeerToPeer: Bool { get set }
```

## Discussion

This property must be set before calling [`publish()`](/documentation/Foundation/NetService/publish()) or [`publish(options:)`](/documentation/Foundation/NetService/publish(options:)), [`resolve(withTimeout:)`](/documentation/Foundation/NetService/resolve(withTimeout:))`, or [`startMonitoring()`](/documentation/Foundation/NetService/startMonitoring()) in order to take effect.

---

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)