How to Build iPhone Apps for the ‘Internet of Things’

What exactly is the “Internet of Things”? It’s a popular phrase used to describe a category of physical devices like home-monitoring devices, lamps, watches and cars that now connect to PCs, tablets, and smartphones. It’s become so ubiquitous, that people sometimes refer to it as the “Internet of Everything.” You may have seen some examples in the Apple Store, or mentioned on technology websites, but few have explained how to build your own app for IoT.

Home automation apps, such as Belkin’s WeMo Switch, or products sold on SmartThings, communicate with door locks or light switches to control your apartment or home from anywhere on a WiFi network. Another well known example is Square, the payment dongle that allows users to use an iPhone or iPad with a specially made scanner for credit card transactions.

Entering the connected device space can seem like an attractive pursuit for a budding entrepreneur, but unless you have a background in electrical engineering, it may also be a daunting endeavor.

Ryan Matzner is the Director of Strategy at Fueled, a development agency in New York City and London that builds mobile apps and web products. According to Matzner, “Building an app that connects with a piece of hardware is complex because you have to think about the limitations of the hardware and how it’s going to connect. Is it over WiFi? Bluetooth? Is it part of Apple’s Made For iPhone (MFi) program? For this reason and more, you won’t find as many startups entering this space in comparison to dating networks or messaging.”

When building an app that relies on hardware, there are many considerations, such as the anatomy and capabilities of the iPhone, iPad or iPod Touch.  Square, for instance, designed its card reader to plug into the headphone jack on iOS devices, rather than the 30-pin (now 8-pin) charging port.  One reason for this decision was to take advantage of the ⅛-inch port’s physical strength, since it has less chance of breakage.

Since all new iPhones now require adapters for old charging devices, Square saved potentially millions of dollars on reworking its design.  However, the company still had to build a product that converts data from a credit card’s magnetic strip into an audio signal, allowing it to recognize transactions, which is neither easy or cheap to do. Yet, this fortune has allowed Square to stay ahead of the curve, compared to iHome, whose line of clock radios likely frustrated new users after the Lightning connector was introduced.

Screen Shot 2013-11-18 at 5.11.53 PM

At the beginning stages of development, you’ll need to decide with which native iPhone features you’ll need to establish connectivity. If you’re using an app that involves sharing or communication, like Celeste, you should know the difference between WiFi and Bluetooth. This could also be beneficial for remote control apps, a very popular one being Snatch, which facilitates interaction between an iOS device and a Macbook. You may even want to contact cellular carriers to make sure there aren’t any differences in their services. For example, Verizon Wireless and Sprint do not allow users to make telephone calls and surf online simultaneously, while AT&T does.

Even if you have a product that doesn’t require an app, it might work with the iPhone’s onboard features, such as the iSight camera. Building an accessory like the Olloclip camera lens may require you to know the zoom and resolution specifications that you’re starting with, along with the dimensions of the phone itself.

Apple’s MFi program and iOS Developer Library are open to developers for any assistance in designing MFi accessories for IoT. These programs provide free technical support for the engineering of iOS-related electronic components. The enrollment costs nothing, though you will have to give Apple $4 of every unit sold when people start buying the finished product.

It would also be wise to understand all of the stipulations that Apple has for its licensees. There are two segments of the program, one for developers and one for manufacturers, each with its own requirements. For the manufacturing license, you’ll need to own your manufacturing facilities, and both licenses involve a credit review of your company. The good news is, qualified businesses will get special access to inside information and even certain pieces of Apple hardware, such as a dock connector.

When developing an app for connected devices, a series of programming protocols must be used to make your accessory work with the iPhone. A common chunk of code, called the External Accessory Framework is entered in the beginning stages to let the iOS product know that another object is trying to communicate with it.

After this step, you must declare the appropriate protocols to link the accessory with a particular app, causing it to launch when connected. According to the iOS Developer Library, if this is not done, iOS will launch the App Store in an attempt to find an app that will be compatible. Lastly, for any interaction involving the two products, an “EASession” must be used to transfer and monitor data. As with any other iOS app, developers must use Objective-C as their programming language.

Creating a piece of app-enabled hardware is more work than most developers usually endure, but it also expands your opportunities to build your own popular mobile product. The Internet of Things is an emerging market with many opportunities left untapped, making it a tempting path for entrepreneurs. Just make sure you’re ready to take the plunge first.