Quite a lot of webpages address this issue but I cannot find a simple (I am a begginer) explanation about how to setup a connection between iOS device and Mac computer. I read things about sockets and service publishing with Bonjour and the Apple documentation but it is quite heavy to understand since there is no tutorial and examples.
Does anyone know how to get the basics to setup a connection and send one file over the network or have a good tutorial to share?
Bonjour provides a way for applications to advertise their services and other applications to discover the advertised services.
The main components of a service are
These components provide all of the necessary information for a "browser" to figure out how to network with the other application (e.g. setting up the network sockets).
However, Bonjour does not provide a way to send data. Applications send data to other applications using sockets. If you don't want to directly use sockets then you can use high-level protocols that are built on top of sockets like FTP, HTTP, etc. I recommend giving Beej's Guide to Network Programming a read if you want to learn the basics of sending and receiving data over a network.