Guest post: Building an iOS app for external devices

Some mobile apps will interact with external devices, an increasingly common occurrence in what many call the “Internet of Things.” A well-known example is Square, the app that allows users to use an iPhone or iPad with a specially made scanner for credit card transactions. Home automation apps, such as SmartThings or Belkin’s WeMo Switch, communicate with door locks or light switches to control your apartment or home from anywhere on your WiFi network. But unless you know some electrical engineers, it may be a daunting task to take on these types of projects.

Ryan Matzner is the director of Fueled, a development agency in New York City that builds mobile apps and web products. Matzner gives an overview of some challenges surrounding app-enabled objects.

“Building an app that connects with a piece of hardware is more complex. You have to think about the limitations of the hardware, how they’re going to connect with each other. Is it over WiFi? Is it over Bluetooth? Is it part of Apple’s Made For iPhone (MFi) program? And thinking about an app in many ways is a lot easier than thinking about an app plus hardware, so it’s a much less common startup.”

When building this kind of app, there are many considerations, such as the anatomy and capabilities of the iPhone, iPad, or iPod Touch.

Square, for instance, designed their 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 1/8-inch port’s physical strength, since it has less chance of breakage. It also turns out that, since all new iPhones now require adapters for old charging devices, Square saved money on reworking their design. However, the company still had to build their product to convert data from a credit card’s magnetic strip into an audio signal, allowing it to recognize transactions. This creativity 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.

Photo credit: freedigitalphotos.net, created by nokhoog_buchachon

As far as developing an app for such accessories, a whole series of protocols must be used to make your device work with the iPhone. A common chunk of code is entered in the beginning stages to let the iOS product know that another object is trying to communicate with it. This is called the External Accessory Framework. As with any other iOS app, developers must use Objective-C as their programming language.

From there, you may need to tap into the native iPhone features. If you have a product that works with the iSight camera, you may need to know the zoom and resolution specifications that you’re starting with. If you are using an app that involves sharing or communication, you should know the difference between WiFi and Bluetooth.

As far as developing an app for such accessories, a whole series of protocols must be used to make your device work with the iPhone. A common chunk of code is entered in the beginning stages to let the iOS product know that another object is trying to communicate with it.

If you’re building a remote control app, you should read up on infrared sensors. 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.

Apple’s MFi program and iOS Developer Library are open to developers for any assistance in designing iOS accessories. Once you’re signed up, you get free technical support for the engineering of any electronic components. The enrollment is free, though you will have to give Apple $4 of every unit sold. Also, it would 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 of which has 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 that qualified businesses will get special access to inside information and even certain pieces of Apple hardware.

Obviously, creating a piece of app-enabled hardware is more work than most developers usually endure, but it also expands your opportunities for creating the next popular mobile product.

Author: Jeremy Rappaport is a marketer at Fueled (iOS app developers). He enjoys writing about technology, entrepreneurship, and industry trends.