Swiftpack.co - Package - grandcentrix/GCXMulticastDNSKit


License Release Carthage compatible Cocoapods compatible

Multicast DNS framework for iOS


GCXMulticastDNSKit is a framework that can be used to discover network services that are announced on the local network. It is a wrapper for the network services provided by Apple.


mDNS is a service to resolve hostnames on a local network without the use of a central domain name server. Instead a resolving host simply sends a DNS query to a local multicast address and the host with that name responds with a multicast message with its IP address. Multicast DNS is also used in combination with DNS based service discovery where a host that provides a network service can announce its service to the local network. Those services can then be discovered using multicast messages

See: [1] Multicast DNS [2] Zeroconf Service discovery

This framework currenlty provides functionality to discover services on the local network based on their service type and service name.




pod 'GCXMulticastDNSKit', :git => 'https://github.com/grandcentrix/GCXMulticastDNSKit.git', :tag => 'v1.3.1'


git "https://github.com/grandcentrix/GCXMulticastDNSKit.git" ~> 1.3.1

Swift Package Manager

Swift Package Manager is a dependency manager built into Xcode. GCXMulticastDNSKit supports SPM from version 5.2.0.

If you are using Xcode 11 or higher, go to File -> Swift Packages -> Add Package Dependency and enter the package repository URL, then follow the instructions.


To use this framework we assume that you know the service type of the services (for example _ptp._tcp is valid service type for PTP/IP services, another example would be _http._tcp). Because there can be more than one service that provides functionality you can also specify an optional prefix for service name that must match. For the example below we are looking for PTP compatible cameras from Vendor A. Those announce themselves with a PTP service type and a services name of Vendor A (#serialnr). We want to find all VendorA cameras on the local network so we use _ptp._tcp as service type and Vendor A as service name prefix:

let configurations = [DiscoveryConfiguration(serviceType: "_ptp._tcp",
                                           serviceNamePrefix: "Vendor A")]

discovery = Discovery(with: configurations, delegate: self)


Copyright 2017 grandcentrix GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.


Stars: 14


Used By

Total: 0


GCXMulticastDNSKit "Sweden" v1.3.1 - 2020-09-16 07:43:21

Adds support for Swift Package Manager

Version: 1.3.1 Build: 1 Tag: v1.3.1 Min deployment target: 9.0

Release Notes:

  • Support for Swift PackageManager. Thanks to @weakfl for the PR.

GCXMulticastDNSKit "Norway" Release v1.3.0 - 2019-04-08 09:33:32

GCXMulticastDNSKit "Norway" Release

Support discovery of locally announced Zeroconf/Bonjour services for Swift.

Version: 1.3.0 Build: 1 Tag: v1.3.0 Min deployment target: 9.0

Release Notes:

  • Swift 5.0

GCXMulticastDNSKit "Canada" Release v1.2.1 - 2018-02-28 10:19:44

GCXMulticastDNSKit "Canada" Release

Support discovery of locally announced Zeroconf/Bonjour services for Swift.

Version: 1.2.1 Build: 1 Tag: v1.2.1 Min deployment target: 9.0

Release Notes:

  • Swiftlint added
  • Housekeeping
  • fix for https://github.com/grandcentrix/GCXMulticastDNSKit/issues/11
  • fix for https://github.com/grandcentrix/GCXMulticastDNSKit/issues/12

Swift4 Standalone - 2018-01-05 10:35:18

Swift4 Standalone

This is the third release of GCXMulticastDNSKit, use 1.2.0 in your Cartfile or Podfile to use this.

Support discovery of locally announced Zeroconf/Bonjour services for Swift. The minimum deployment target is 9.0.

  • Objective-C support has been removed

Minor Bugfix 1.0.2 - 2017-03-23 08:48:00


  • testability improvment by opening the access modifiers


  • fixes objc_weak_error warnings

First public release of GCXMulticastDNSKit - 2017-03-15 08:33:12

This is the initial public release of GCXMulticastDNSKit