<!--
{
  "availability" : [
    "iOS: 4.2.0 -",
    "iPadOS: 4.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDINetworkHost/init(name:netService:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:objc(cs)MIDINetworkHost(cm)hostWithName:netService:"
  },
  "title" : "init(name:netService:)"
}
-->

# init(name:netService:)

Creates a host with the specified name and net service.

```
convenience init(name: String, netService: NetService)
```

## Parameters

`name`

The host name.

`netService`

The net service.

## Discussion

---

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)