Swiftpack.co - grandcentrix/RxGCXMulticastDNSKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by grandcentrix.
grandcentrix/RxGCXMulticastDNSKit v1.5.0
This is a simple RxSwift wrapper for GCXMulticastDNSKit.
⭐️ 2
🕓 2 years ago
iOS
.package(url: "https://github.com/grandcentrix/RxGCXMulticastDNSKit.git", from: "v1.5.0")

RxGCXMulticastDNSKit

License Release Carthage compatible Cocoapods compatible [![badge-swiftpm]][swiftpm]

This is a simple RxSwift wrapper for GCXMulticastDNSKit.

Requirements

RxSwift @ v6.x GCXMulticastDNSKit @ v1.4.0

Usage

public enum DiscoveryResult {
    case serviceFound(DiscoveryService)
    case failure(DiscoveryConfiguration, DiscoveryError)
    case serviceRemoved(DiscoveryService)
}
let disposeBag = DisposeBag()

...

let configuration = DiscoveryConfiguration(serviceType: "_http._tcp", serviceNamePrefix: "GCXDNSKitTest")
Discovery.rx.service(configurations: [ configuration ] ).subscribe(onNext: { result in
	  switch (result) {
            case .failure(let configuration, let error):
            	// handle the error
                break
            case .serviceFound(let service):
            	// we got a service
                break
            case .serviceRemoved(let service):
            	// a service disappeared
                break
            }
    }).addDisposableTo(disposeBag)

Installation

Swift Package Manager

Add the following entry to your package's dependencies:

.Package(url: "https://github.com/grandcentrix/RxGCXMulticastDNSKit.git", .upToNextMajor(from: "1.5.0")))

Carthage

git "https://github.com/grandcentrix/RxGCXMulticastDNSKit.git"

Cocoapods

use_frameworks!

pod 'RxGCXMulticastDNSKit'

License

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

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

GitHub

link
Stars: 2
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

RxGCXMulticastDNSKit 1.5.0
2 years ago
  • Update GCXMulticastDNSKit dependency to version 1.4.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics