Questions tagged [nsnetservice]

The NSNetService class represents a network service, either one your application publishes or is a client of. Available in OS X v10.2 and later with Apple's Foundation framework.

The methods of NSNetService operate asynchronously so your application is not impacted by the speed of the network. All information about a service is returned to your application through the NSNetService object’s delegate. You must provide a delegate object to respond to messages and to handle errors appropriately.

NSNetService class and the NSNetServiceBrowser class use multicast DNS to convey information about network services to and from your application. The API of NSNetService provides a convenient way to publish the services offered by your application and to resolve the socket address for a service.

The types of services you access using NSNetService are the same types that you access directly using BSD sockets. HTTP and FTP are two services commonly provided by systems. (For a list of common services and the ports used by those services, see the file /etc/services.) Applications can also define their own custom services to provide specific data to clients.

Source: NSNetService class reference

Related tags:

112 questions
0
votes
1 answer

Getting Error when UnArchived NSMutableDictionary o NSData?

I am trying to send a dictionary of information from one iphone to another iphone through wifi/blutooth,for that i implement CFnetwork and NSNetservice Concept.I received Data in the Reciver side. I did code as follows .... **Sender Side** …
0
votes
1 answer

Bluetooth,Wifi with Bonjour Network

If i am publishing a NSNetService in (Bonjour based NetWork) Iphone Application,which net Work will use in my application
Musthafa P P
  • 645
  • 3
  • 7
  • 21
0
votes
0 answers

mDNS Discovery for AirPlay Devices

I want to make an mDNS Discovery for the AirPlay devices in my network using NetService. I need to get the device name and IP address of the Device. func netService() { let service = NetService( domain: "local.", …
Rithik
  • 11
  • 4
0
votes
2 answers

Get Model Identifier of Device in Network

I have a couple of Apple devices in my network (both computers and mobile devices). I was wondering if it is possible, to get the model identifier like Macmini9,1 if I have the IP address and/or the Mac address. I am using the NetServiceBrowser and…
inexcitus
  • 2,471
  • 2
  • 26
  • 41
0
votes
1 answer

for each publish,how can i make my device name as unique?

i am publishing my netService object once with same domain and name. another device finding my service as myService . but again i publishing my netService object again with same domain and name .another device will detect my devise as…
Vipin
  • 4,718
  • 12
  • 54
  • 81
0
votes
1 answer

How can i stop the process of searching for new devices in wifi network?

in my wifi network code i am using a NSNetServiceBrowser delegate searchForServicesOfType which will starts a search for services of the specified type in the domain indicated by domainString [self.netServiceBrowser searchForServicesOfType:types…
Vipin
  • 4,718
  • 12
  • 54
  • 81
0
votes
1 answer

How to remove a published service NetService

I am using the latest Swift documentation to write NetService, which am able to publish and search. But I am unable to remove service from the publisher. Not able to understand the role of RunLoop here. However, if I kill the app then service is…
Tarun Chawla
  • 508
  • 4
  • 17
0
votes
0 answers

Bonjour -How to get the IP address to uniquely identify each client connected to the network

I'm not well versed in networking but I'm firing up my own Bonjour service to find nearby users. I read this blog post and it says: Socket represents a unique communication endpoint on the network. When your app needs to exchange data with…
Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0
votes
1 answer

NSNetService Assign IP Address using C#

Using Python link I am able to publish a service set the IP address that I want to connect to when user selects the device in control Center. Below is the Code for Python. Now using NSNetService in C# I am trying to achieve same thing. Publish is…
user2801184
  • 329
  • 7
  • 27
0
votes
1 answer

NSNetService doesn't contain any addresses

I'm hosting a service in a Mac application and connecting with an iOS app. While the iOS app will find the service, the service doesn't contain any addresses, so I can't connect a socket. This is my hosting code on the Mac: - (void)start { …
Lepidora
  • 31
  • 1
0
votes
1 answer

NSNetServiceBrowsing cannot resolve Services with Error -72004

For a couple of days I try to implement a App that browses for Bonjour-Services in my Network and display them in the Console (for the first step). I implemented a class with a NSNetServiceBrowser and initialized it as indicated in many posts here.…
0
votes
0 answers

NSNetserviceBrowser delegate method is not firing

I am doing one application. In that I am publishing the service using NsNetservice and browse using NSNetserviceBrowser. But sometimes service publish the services successfully, but browser not able to find that service using didFindservice delegate…
user777021
  • 75
  • 2
  • 8
0
votes
0 answers

NetService getting proper Inet type while debugging but not working from archived IPA

I am working with netsevices and using below function to Get IPV4 and IPV6 address.Getting Proper addresses while debugging or simple IPA file. But AFTER ARCHIVING I do not get proper INET Type. This is strange issue. func…
anshul king
  • 558
  • 4
  • 17
0
votes
1 answer

Can i use TDAudioStreamer with GCDAsyncSocket or NetService?

I want to stream audio file between to multiple device, one act as server and other as client on the local network, I found https://github.com/tonyd256/TDAudioStreamer this class that stream audio to connected client but it use multiplier…
0
votes
1 answer

Resolving a hostname from Bonjour networking

I have a Java based server using JmDNS which is being discovered from an iOS app. The discovery works fine and this is the callback that gets executed by the NetServiceDelegate to record the details: public func netServiceDidResolveAddress(_…
zorro2b
  • 2,227
  • 4
  • 28
  • 45