News

CodePush Now Part of Visual Studio Mobile Center

Microsoft's Visual Studio Mobile Center -- a back-end "mission control for mobile apps" -- now supports CodePush updates of JavaScript-based apps.

CodePush, still in preview, was announced about two years ago, providing a way to update certain apps directly without going through an app store redeployment.

Those apps include JavaScript-based Apache Cordova and React Native apps, because store-deployed apps with interpreted code -- as opposed to compiled code -- are typically able to bypass the sometimes-problematic and time-consuming review process with direct updates. Such Updates need to be minor in nature, described by Microsoft as "bug fixes and improvements/features that maintain the app's original/presented purpose."

CodePush is open source and free to use during its preview, with a free tier expected to be available even after the service goes to production-ready general availability.

In a blog post yesterday, Microsoft detailed how CodePush updates as of June 2 are supported in Visual Studio Mobile Center, a cloud-based, back-end hub that provides services such as building, testing, distribution, crash analytics, user authentication, table storage and so on.

Program manager Ian Geoghegan noted that since its debut in 2015, "mobile app developers have deployed thousands of releases to in-production apps -- deploying quick bug fixes, feature improvements and content updates via the cloud. In a world where updates submitted through the app store can sometimes take days, these developers have enjoyed a huge market advantage because they can respond to customer feedback more quickly with instant app updates to some or all of their end-users."

He further explained the inner workings of the CodePush service and how to use it with Mobile Center for updating a React Native "hello world" app.

The CodePush Update Lifecycle
[Click on image for larger view.] The CodePush Update Lifecycle (source: Microsoft).

"Mobile apps written with Cordova and React Native execute at least some of their code as interpreted JavaScript," Geoghegan said. "In the case of Cordova, JavaScript runs in a webview that displays HTML and CSS controls. For React Native, JavaScript runs in a background thread (i.e. JavaScript Core) that ultimately produces native UI and animations via the React Native framework.

"Developers bundle this JavaScript and include it with their application prior to distribution. CodePush-enabled applications dynamically update their JavaScript code either automatically or on-demand, thus empowering developers to provide incremental updates at-will."

CodePush update lifecycles typically work like this, Geoghegan said:

  • You publish your app to the store with both native and JavaScript code bundled together. We'll call this version 1.0.0 (0) where the parenthetical represents the CodePush release number.
  • Your customer installs your app from the store.
  • After changing your JavaScript, you release update v1.0.0 (1) to the CodePush service hosted in Azure. Notice the CodePush release number has incremented to "(1)."
  • On any app event (for example, onresume), the app queries the CodePush service to compare the JavaScript bundle installed on the device to the most recent one available in the cloud.
  • If the cloud version is both higher and matches the native code version, then it downloads and installs the newer update.

Future plans for the CodePush service, the senior program manager for the Mobile Developer Division said, include better integration with the Mobile Center crash service (now providing only JavaScript stack traces for iOS) and bundle signing. Also, the Mobile Center team will seek to provide more platform support for CodePush and other services. Those plans can be seen in the Mobile Center roadmap.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events