<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.0.0 - 10.13.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMachBootstrapServer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMachBootstrapServer"
  },
  "title" : "NSMachBootstrapServer"
}
-->

# NSMachBootstrapServer

A port name server that takes and returns Mach port objects.

```
@interface NSMachBootstrapServer : NSPortNameServer
```

## Overview

Port removal functionality is not supported in [`NSMachBootstrapServer`](/documentation/Foundation/NSMachBootstrapServer); if you want to cancel a service, you have to destroy the port (invalidate the [`NSMachPort`](/documentation/Foundation/NSMachPort) given to [`registerPort:name:`](/documentation/Foundation/NSMachBootstrapServer/registerPort:name:)).

## Topics

### Getting the Server Object

[`sharedInstance`](/documentation/Foundation/NSMachBootstrapServer/sharedInstance)

Returns the shared instance of the bootstrap server.

### Looking up Ports

[`portForName:`](/documentation/Foundation/NSMachBootstrapServer/portForName:)

Looks up and returns the port registered under the specified name on the local host.

[`portForName:host:`](/documentation/Foundation/NSMachBootstrapServer/portForName:host:)

Looks up and returns the port registered under the specified name.

[`servicePortWithName:`](/documentation/Foundation/NSMachBootstrapServer/servicePortWithName:)

Looks up and returns the port for the vended service that is registered under the specified name.

### Registering Ports

[`registerPort:name:`](/documentation/Foundation/NSMachBootstrapServer/registerPort:name:)

Registers a port with a specified name.



---

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)