Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.
/ BonjourSwift Public archive

Easily access Bonjour services and domains in Swift

License

Notifications You must be signed in to change notification settings

ecnepsnai/BonjourSwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BonjourSwift

Easily access Bonjour services and domains in Swift Updated to Swift 3.0

Installation

Cocoapods

Add:

pod 'BonjourSwift'

To your pod file. Make sure you uncomment use_frameworks!

Manual

Drag Bonjour.swift onto your project.

Usage

Finding a service

func startSearch() {
    let browser: Bonjour = Bonjour()
    // This will find all HTTP servers - Check out Bonjour.Services for common services
    browser.findService(Bonjour.Services.Hypertext_Transfer, domain: Bonjour.LocalDomain) { (services) in
        // Do something with your services!
        // services will be an empty array if nothing was found
    }
}

Finding domains

func startSearch() {
    let browser: Bonjour = Bonjour()
    bonjour.findDomains { (domains) in
        // Do something with your domains!
        // services will be an empty array if nothing was found
    }
}

Features

  • Gracefully handle search that fail to find and services or domains
  • Adjustable timeouts
  • Method documentations
  • 100% organic free-range gluten-free vegan-certified

About

Easily access Bonjour services and domains in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published