Sitemap
ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Member-only story

Bonjour: Network Discoverability But Easy

--

Press enter or click to view image in full size
Photo by You X Ventures on Unsplash

Recently I found myself trying to achieve something different than what I normally do. I needed to share some information between iOS devices but I didn’t want to develop a backend to be able to achieve it. And so began the search for an alternative.

After a few hours of looking around and thinking that probably Bluetooth might be the obvious solution, I came to a sudden realization:

The iPhones are also connected to my home network, why not take advantage of that?

Sounds straightforward enough. All I need is to figure out how to make the devices see each other and establish communication between them. Easy right? Well, it depends because on paper it sounds pretty painless:

  1. Figure out the IP of the device receiving the data.
  2. Establish a connection with it.
  3. Send data.

Ok, that’s the gist of it if you will. 3 easy simple-sounding steps. However, I don’t know about you but I’ve never worked with network protocols before. Nor have I ever read about how one begins to approach this situation on iOS. Most of the apps I normally use and develop rely on a server to pass information between instances of the app on different devices.

--

--

Mike Pesate
Mike Pesate

Written by Mike Pesate

Senior iOS Developer trying to write more and share more.

ITNEXT
ITNEXT

Published in ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.