nsnetservicebrowser

Bonjour Service Browser with Swift does not fetch serviceinfo

丶灬走出姿态 提交于 2019-12-22 12:02:21
问题 The service I want to connect to is published via Bonjour. I can find all the info with the Bonjour Browser, however if I try to gather the data programmatically, the only value I get, is the name of the service. The NetService delegate is set and the function netServiceWillPublish is called. The functions DidNotPublish or DidPublish are not executed. The function netServiceBrowser gets all published netServices, but all properties are set to the default value of the datatype. import UIKit

NSNetServiceBrowser to find any device on network

霸气de小男生 提交于 2019-12-11 11:27:42
问题 As per the title: I am wondering how IOS is able to find devices on the network that are non-bonjour. Specifically I need to find a control device that will in the future have the appropriate Bonjour announce code but there are tons of these devices already out in consumers hands and firmware updates are not an option. How then can I use Bonjour or NSNetServiceBrowser or some other library that is compatible with the apple store to discover on the network older devices? IE - in android I

NSNetServiceBrowser cannot find any service, the delegate method does not seems to be called

≡放荡痞女 提交于 2019-12-11 10:57:47
问题 I am using NSNetServiceBrowser to browse bonjour service. The service is started successfully, however, I am facing an issue while browsing the service. When I make the call searchForServicesOfType:inDomain , only the netServiceBrowserWillSearch delegate method is called. No other delegate method is called and I cant find any service. The answer seems to be given by this guy here, NSNetServiceBrowser not finding services that exist but I cant understand what does he actually means (see part 2

NSNetServiceBrowser/Bonjour issues on iOS

时光总嘲笑我的痴心妄想 提交于 2019-12-08 23:40:40
问题 I'm using Bonjour (NSNetServiceBrowser, to be precise) over WiFi in an app I'm developing for an iOS project I've been working on. However, despite noting the issues raised in the excellent response at Why does NSNetServiceBrowser find unpublished services in iPhone OS? I am still encountering a number of difficulties with NSNetSericeBrowser. My set-up is as follows: Working with iPads running iOS 4.5.3. Using an AirPort Express as an access point/router. Running dns-sd -B _serviceName on my

NSNetServiceBrowser does not find Service

断了今生、忘了曾经 提交于 2019-12-07 22:41:16
问题 I tried to write a Client(iPad)/Server(iMac) application based on the CocoaEcho example. My first simple example worked, but after adding more functionality the client is unable to find the server. After starting the server, I start the client, both in a local network. The client starts searching for services and gets a "netServiceBrowserWillSearch:" message for its browser, but after that nothing happens. Triggering the search for services again, results in a "didNotsearch:" message with

Bonjour Service Browser with Swift does not fetch serviceinfo

天涯浪子 提交于 2019-12-06 12:07:49
The service I want to connect to is published via Bonjour. I can find all the info with the Bonjour Browser, however if I try to gather the data programmatically, the only value I get, is the name of the service. The NetService delegate is set and the function netServiceWillPublish is called. The functions DidNotPublish or DidPublish are not executed. The function netServiceBrowser gets all published netServices, but all properties are set to the default value of the datatype. import UIKit class BMNSDelegate : NSObject, NetServiceDelegate { func netServiceWillPublish(_ sender: NetService) {

NSNetServiceBrowser does not find Service

坚强是说给别人听的谎言 提交于 2019-12-06 11:43:40
I tried to write a Client(iPad)/Server(iMac) application based on the CocoaEcho example. My first simple example worked, but after adding more functionality the client is unable to find the server. After starting the server, I start the client, both in a local network. The client starts searching for services and gets a "netServiceBrowserWillSearch:" message for its browser, but after that nothing happens. Triggering the search for services again, results in a "didNotsearch:" message with error -72003, 10 (browser is still busy searching). 1) I checked that the server is reachable with the

Swift 3 how to resolve NetService IP?

可紊 提交于 2019-12-01 03:50:21
问题 Just trying Bonjour in swift 3 Here is my code , I can receive the delegate func netServiceDidResolveAddress(_ sender: NetService) { print("netServiceDidResolveAddress service name \(sender.name) of type \(sender.type)," + "port \(sender.port), addresses \(sender.addresses)") } And here is my result netServiceDidResolveAddress service name Webber's Mac mini of type _myapp._tcp.,port 5678, addresses Optional([<1002162e c0a80205 00000000 00000000>, <1c1e162e 00000000 fe800000 00000000 00bce7ad

Disconnecting with server immediately after connecting

僤鯓⒐⒋嵵緔 提交于 2019-11-30 16:00:42
I have written a Singleton Class using GCDAsyncsocket Library to establish connection with any other device having same service using Bonjour. On one device I am using its Method " startPublishing " to make it a Host(Server), from the Application on another Device(Client) I am calling " StartBrowsing " to find out the available Devices in Network. When user selects any of service in that Network I am calling method " initConnectionWithService ", that initiate Connection flow by resolving address of NetService to connect. BonjourUtilClass.h @interface BonjourUtilClass : NSObject

NSNetServiceBrowser/Bonjour issues on iOS

被刻印的时光 ゝ 提交于 2019-11-30 11:50:36
I'm using Bonjour (NSNetServiceBrowser, to be precise) over WiFi in an app I'm developing for an iOS project I've been working on. However, despite noting the issues raised in the excellent response at Why does NSNetServiceBrowser find unpublished services in iPhone OS? I am still encountering a number of difficulties with NSNetSericeBrowser. My set-up is as follows: Working with iPads running iOS 4.5.3. Using an AirPort Express as an access point/router. Running dns-sd -B _serviceName on my Mac connected to the network works fine -- that is to say, all calls to publish and stop are