Serial Communication Application

We have been looking into developing an application for iOS that will allow the phone to connect to a sensor through a serial connection. The purpose is to change the settings of the sensor using the phone. However, I have been made aware that we would be unable to develop such an app unless we enroll in the MFI program.

We considered alternatives such as using Redpark’s cables and their SDKs, but according to them publishing would not be possible. They mentioned we could develop the app and publish through Apple Business Manager to distribute to corporate customers, but as far as I could tell, this requires the customer to be enrolled in the Apple Business Manager program as well.

What we wish to do is publish publicly in both iOS and Android, but for iOS there doesn’t seem to be support for serial communication, and I am assuming appropriate APIs/SDKs are available only through the MFI program.

I would like to know what options we have and how we can explore them.

Thank you very much for your time.

for iOS there doesn’t seem to be support for serial communication

That’s basically correct. iOS has a lot of the same serial infrastructure as macOS but:

  • It doesn’t have built-in support for USB serial devices.

  • It doesn’t allow you to write your own code to add that support.

Note The situation is different on iPadOS, where we recently added support for DriverKit. It may be possible to do point 2 using DriverKit. I’m not 100% sure about that — DriverKit isn’t really my area of expertise — but it would certainly be worth investigating.

I am assuming appropriate APIs/SDKs are available only through the MFI program.

That’s not quite how this works. The API for accessing MFi accessories is in the standard iOS SDK, namely External Accessory framework. The issue is the accessory itself. You can only build an EA-compatible accessory under the aegis of the MFi programme.

One other possibility is to build a bridge between serial and some protocol that iOS does support out of the box. The obvious one here is Bluetooth LE. If you don’t need huge bandwidth, you could reasonably build (or source) a Bluetooth LE to serial bridge, and then talk to it using Core Bluetooth.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

While not ideal, but you can use the MIDI protocol that is supported over the Camera Connection Kit for lightning ports, or with a regular USB-C cable for USB-C ports. While the MIDI protocol is pretty old it supports sending data in MIDI System Exclusive messages. It should work just fine for any type of devices, not just musical instruments.

Serial Communication Application
 
 
Q