i would like to know how to do the following:
step 1: how to send the following string from the iphone to a mac computer via WIFI when a user presses a button.
string to be sent: "hello".
step2: how to receive that string with an application i would have to create. it will be very simple. it will have no interface, except it will just print out the message.
How do i achieve something like this. I've never sent a signal over WIFI with the iphone programming. Can someone guide me please?
I'll quote myself from a similar question:
Using the CFNetwork framework, you can use bonjour for discovery and then handle a persistent connection through native sockets for passing data back and forth.
Here is an excellent tutorial to get started, its for iOS but CFNetwork is available in OS X too.