News

Azure IoT Hub SDK Opens Up to iOS Devices

Microsoft admits that iOS devices aren't traditionally used for Internet of Things (IoT) deployments, but it's seeking to help change that.

The company yesterday announced its SDK for the Azure IoT Hub now officially provides native iOS support, letting coders create IoT projects in the cloud written either with the Swift programming language or the older Objective-C.

That's enabled by a port of the company's Azure IoT Hub C SDK for Apple's mobile platform.

"iOS devices are traditionally not viewed as IoT devices, but recently, they are getting traction in the IoT space," said Microsoft program manager Yi Zhong in a blog post yesterday.

The SDK port will let developers turn iOS devices into IoT devices, with libraries available on the CocoaPod package manager. The SDK is also available on GitHub.

The native iOS support was actually raised in 2016 in the Azure development feedback forum site, asking for "SDK support for native iOS apps not built with Xamarin."

Microsoft last December said it decided to support the native iOS idea -- which garnered 32 votes of support -- and just closed the request issue yesterday.

Along the way, in the project's preview, Zhong said, the company discovered some interesting scenarios for using iOS devices in IoT implementations, including:

  • iOS device as the gateway for leaf devices or sensors on the factory floor.
  • iOS device in a meeting room, which acts as an end IoT device to send and receive messages from Azure IoT Hub.
  • iOS device to view the visualization of IoT telemetry.
  • iOS device to manage IoT Hub operations.

"So, what is in the box? Zhong said. "If you have interacted with our Azure IoT Hub C SDK before, this would be familiar to you! Our C SDK is written in C99 for maximum portability to various platforms. The porting process involves writing a thin adoption layer for the platform-specific components. You can find a thin adoption layer for iOS on GitHub. All the features in the C SDK can be leveraged on iOS platform directly, including the Azure IoT Hub features we support and SDK specific features such as retry policy for network reliability."

She also noted iOS is now included in the test suite used to put every release through its paces with unit tests, integration tests and end-to-end tests, all of which are also available on GitHub. Soon, she said, Azure IoT Hub Device Provisioning Service SDKs will also be available on the iOS platform.

Azure IoT sample iOS projects are also available on GitHub.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube