News

Native iOS App Update Tool Gets Swift Support

Shortly after Walmart open sourced a tool for over-the-air React Native updates -- bypassing app store approval processes -- Rollout.io Inc. added Swift support to its own similar solution for iOS apps.

Rollout says it enables mobile developers to instantly push code-level changes to live apps without having to release a new version through the Apple App Store or wait for users to manually update their apps.

Having already provided that capability for iOS apps built with the Objective-C programming language, the company is letting Swift coders in on the action.

"Now, at the request of its developer community, Rollout is bringing that functionality to a completely new arena, Apple's fast-growing native app language Swift," the company announced last week. "For the first time, Swift developers will have the ability to make critical updates to their live apps via Rollout without the hurdle of going through the App Store review process."

Swift, of course, is Apple's young, open source programming language positioned by the company to replace the ageing Objective-C as the default language for coding apps targeting iOS-based iPhones and iPads.

"The technology behind Rollout's Swift implementation involved building runtime method replacement for Swift, which was difficult to create because of Swift's lack of dynamic capabilities compared to Objective-C," the company said. "As a result, app makers will now be able to patch code at runtime with Swift, something that was impossible to do before."

A Rollout exec provided more details on the announcement in a blog post titled "Rollout Now Supports Swift!"

"If you've been waiting for Swift support in order to try out Rollout, just download the latest version of the SDK and start patching your live Swift apps," the post said. "We've developed some really cool new technology in order to support Swift. Basically we've created pseudo method swizzling in Swift. All of the magic still happens without the need for developers to make any code changes or decide in advance what methods they want to patch. After all, you never know what you'll want to fix."

The company further describes the coding gymnastics required for this update in another blog post titled "Rollout Swift Support – Under The Hood."

While too technical to describe here, it involves a technique the company calls "pre-SIL instrumentation." Here's a taste of the technical explanation: "SIL stands for Swift Intermediate Language, it is generated from the Abstract Syntax Tree. This intermediate form is used by the Swift optimizer to perform Swift language specific optimizations prior to generating the LLVM IR." LLVM is a compiler infrastructure project, and IR stands for "immediate representation."

Unlike the React Native tool that was open sourced by Walmart, the Rollout tool is a full-on commercial product. Pricing for various editions of the Rollout solution -- ranging from Lite (free) to Pro to Enterprise, is available here.

The San Francisco-based Rollout said its technology is used by thousands of app developers who have installed it on more than 50 million devices.

About the Author

David Ramel is an editor and writer for Converge360.