If you regularly use Universal Windows Platform (UWP) apps on Windows 10, you have some good news coming your way. Microsoft has announced that starting with Windows 10 version 1803, developers can opt-in to support multiple instances of their UWP app.
In previous versions of Windows 10, users could only run one instance of a UWP app at one time. However, with version 1803, an app with multiple-instance capability will be able to run a new process if an activation request comes through.
Microsoft has detailed several code samples and templates that explain how developers can add the capability to their UWP apps. New or existing instances of a UWP app can be launched and customized separately using these implementations. The company explains that:
For example, if the app opens files, you may want to prevent multiple instances from working on the same file. If the app is launched for a file that is already open, you may want to redirect the activation to the instance that is already editing the file.
Interestingly, multi-view has been available in the default Calculator app for quite a long time. However, this is slightly different than multi-instancing because there is only one Calculator.exe process running. The firm notes that multiple-instancing has been available in the Insider Preview since build 17074 and the accompanying Windows SDK 17069, but the project templates are being made available now.
In its latest Windows Community Standup episode, Microsoft has explained that some apps will only need minimal changes in the code to support multiple-instancing while complex apps will require relatively larger modifications. Furthermore, there will be no limit on the number of active instances of an app, and if one instance crashes, the others will keep operating.
While multi-instancing in UWP apps is certainly an exciting prospect, Microsoft has noted a few considerations that developers need to keep in mind. For example: background audio apps do not support multi-instancing, and the feature is only supported in desktop and Internet of Things (IoT) projects. You can check out the complete details in Microsoft's documentation here.
Editor's note: The article was updated after publication to clarify that the stock Calculator app in Windows 10 supports multi-view, not multi-instancing.
35 Comments - Add comment