Questions tagged [nsnetservicebrowser]

41 questions
12
votes
1 answer

NSNetServiceBrowser/Bonjour issues on iOS

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…
Jonathan Ellis
  • 5,221
  • 2
  • 36
  • 53
10
votes
4 answers

Swift 3 how to resolve NetService IP?

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…
Webber Lai
  • 2,014
  • 5
  • 35
  • 66
7
votes
2 answers

NSNetServiceBrowser didRemoveService takes longer after opening stream

I have the following code for discovering services on the network: [netServiceBrowser setDelegate: self]; [netServiceBrowser searchForServicesOfType: serviceType inDomain: domain]; That results in calls to these two methods (find service and…
Yvo
  • 18,681
  • 11
  • 71
  • 90
7
votes
1 answer

How to set a break on objc_weak_error

In my app I sometimes get this error: objc[3899]: __weak variable at 0x610000056bd0 holds 0x10003 instead of 0x610000302640. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug. How do I set a…
KaasCoder
  • 251
  • 5
  • 14
7
votes
0 answers

How to flush DNS cache while resolving a service using NSNetServiceBrowser in swift?

I am resolving a udp service using NSNetServiceBrowser. It is working fine but if I disconnect my service then also it discovers it. I got a link which says it remains visible for a while because the DNS record reaches its time-to-live interval and…
Mohit Mangla
  • 337
  • 1
  • 15
5
votes
1 answer

NSNetServiceBrowser delegate not called when searching

I got a really annoying problem. Im trying to search after a NSNetService (that i know exist). I've copied the example code from http://www.macresearch.org/cocoa-scientists-part-xxviii-bonjour-and-how-do-you-do into my own application. I can see…
Jonas Jongejan
  • 2,826
  • 1
  • 16
  • 17
5
votes
1 answer

Knowing status of a bonjour service

I'm using NSNetService and NSNetServiceBrowser to publish and scan for Bonjour services on the network. The implementation is working fine, the services are found on the network and they are capable of communicating. I'm currently trying to…
André Fratelli
  • 5,920
  • 7
  • 46
  • 87
4
votes
3 answers

Apple Bonjour: how can I tell which published service is my own?

I have two iOS devices finding each other successfully using the Bonjour API, but since they are both simultaneously publishing and browsing, they also see themselves appearing in the list of available services. There must be some bit of information…
iforce2d
  • 8,194
  • 3
  • 29
  • 40
4
votes
1 answer

Disconnecting with server immediately after connecting

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…
Mrug
  • 4,963
  • 2
  • 31
  • 53
3
votes
2 answers

NetServiceBrowser gives a different NetService when Removed

I was hoping to do something like this: In netServiceBrowser:didFindService:moreComing: [self.foundServices addObject:aNetService]; And in netServiceBrowser:didRemoveService:moreComing: [self.foundServices removeObject:aNetService]; However, the…
Zeophlite
  • 1,607
  • 3
  • 19
  • 36
3
votes
2 answers

Error resolving a NSNetService

I'm creating a board game to be played via wi-fi, in the iPhone. When device A invites device B to play(try to resolve the NSNetService published by B), device B can accept or decline. If B declines, A is notified and everything is fine. But if A…
Fernando
  • 7,785
  • 6
  • 49
  • 81
3
votes
1 answer

Bonjour Service Browser with Swift does not fetch serviceinfo

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…
Rufus_12
  • 392
  • 1
  • 5
  • 14
3
votes
2 answers

Using NSNetService and NSNetServiceBrowser on a Swift application

I'd like to make an app that is able to discover and connect to peers on the local network, so i've decided to implement it in swift, using the bonjour framework. However, i can't make Bonjour work using Swift, and I can't figure out why. Here is…
jbl
  • 33
  • 1
  • 4
3
votes
0 answers

NSNetServiceBrowser browse all service type

How can I browse for all services regardless of their service type using Bonjour ? NSNetServiceBrowser can browse for specific servie type - "_music._tcp". Code example: NSNetServiceBrowser *serviceBrowser; serviceBrowser = [[NSNetServiceBrowser…
user3078139
  • 31
  • 1
  • 3
2
votes
2 answers

How to get IP and PORT of a service published by AVAHI in iOS swift?

I am using NSNetServiceBrowser and is able to find service list published by AVAHI in "didFindService" which looks like : Service appeared: local. _https._tcp. TEMP-Mobileyes5-1C497B9ED382 -1 Service appeared: local. _https._tcp.…
Krishna Kumar Thakur
  • 1,456
  • 12
  • 27
1
2 3