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
I'll quote myself from a similar question:
How can I create a small Mac app that receives data over the WiFi network from an iOS app?
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.
http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html
Here is an excellent tutorial to get started, its for iOS but CFNetwork is available in OS X too.
http://mobileorchard.com/tutorial-networking-and-bonjour-on-iphone