<!--
{
  "availability" : [
    "iOS: 2.0.0 - 27.2.0",
    "iPadOS: 2.0.0 - 27.2.0",
    "macCatalyst: 13.1.0 - 27.2.0",
    "macOS: 10.2.0 - 27.2.0",
    "tvOS: 9.0.0 - 27.2.0",
    "visionOS: 1.0.0 - 27.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NetServiceBrowser/stop()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSNetServiceBrowser(im)stop"
  },
  "title" : "stop()"
}
-->

# stop()

Halts a currently running search or resolution.

```
func stop()
```

## Discussion

This method sends a [`netServiceBrowserDidStopSearch(_:)`](/documentation/Foundation/NetServiceBrowserDelegate/netServiceBrowserDidStopSearch(_:)) message to the delegate and causes the browser to discard any pending search results.

## See Also

[`func netServiceBrowserDidStopSearch(NetServiceBrowser)`](/documentation/Foundation/NetServiceBrowserDelegate/netServiceBrowserDidStopSearch(_:))

Tells the delegate that a search was stopped.



---

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)