One of the great new Universal App features in Windows 10 Anniversary Edition is App Extensions. This is the platform that Microsoft Edge uses to create its browser extensions and is available for any developer to use. This post is to give you a brief overview of App Extensions, show you where you can learn more, and to answer some common questions about App Extensions. At the end are a few links to samples and a great //Build session on App Extensibility.
What is an App Extension?
App Extensions can go by many names, such as plugins, add-ins, extensions, or add-ons. They all describe the same basic concept of one piece of software adding functionality to another piece of software. The key properties of app extensions are that they are an app-to-app relationship, and that they are typically made by 3rd parties.
The term “extension” is often overloaded in app models and that can be confusing. In iOS, App Extensions refer to an app-to-OS relationship, where the app is extending the operating system. In UWP, there is an “extensions” element in the manifest which is also used for extending the operating system and creating declarations. When we say “App Extensions” we are specifically referring to extensions your app creates or consumes from other apps, not the operating system.
What’s special about our model?
Most extension platforms are custom for each app. We have created a feature that allows you to express theses relationships and have them supported in the Windows Store. Our model is unique in a few interesting ways:
- App Extensions are not a new kind of app; they are a normal app with an OS extension declaration that allows them to share content and deployment events with app extension hosts.
- Your app can be a host to many different extensions.
- Your app can provide multiple extensions.
- Extension namespaces can be shared, allowing different apps to utilize the same extension platform or interface.
This allows you to grow your app over time, adding extensions for other apps or adding extension hosting to your own app. If you want to add a new extension for another popular app commonly used with your app, then you do not need to create a standalone package; you can simply add it to your existing app. This saves you a bit of trouble trying to inform and direct your customers to acquire another package, and allows you to light up functionality with just an app update.
Your app can be a fully functional app, have an app extension platform to host extensions, and also provide extensions for other apps, all without having to create new app packages. If you have several similar apps, you can even create a single app extension platform that all of them can use and share extensions.
How do App Extensions differ from Optional Packages?
A common question we get is when to use Optional Package vs App Extensions. The key differentiators are open ecosystem vs closed ecosystem, and dependent package vs independent package.
App extensions are an open ecosystem. App extensions are intended for anyone to enhance your app. There is no gating or control over who gets to make an app extension. Optional packages are a closed ecosystem where the publisher decides who is allowed to make an optional package.
App extensions are also independent packages. They can be standalone apps and cannot have a deployment dependency on another app. Optional packages require the primary package and cannot run without it.
- An Expansion pack for a game would be a good candidate for an Optional Package; it’s tightly bound to the game, doesn’t run without it, and expansion packs are not available for any developer in the ecosystem to create.
- If that same game were to have customizable UI add-ons or theming, then an App Extension would be a good choice for that platform. The app providing the extension could run on its own, and any 3rd party could make them.
Why would I want to use App Extensions?
As an App Extension Host, your app can create an ecosystem where other developers can enhance your app in ways that you may not have expected or had the resources to do. Consider Microsoft Office extensions, Visual Studio extensions, browser extensions, or extensions found in like other apps. These all create rich experiences for these apps that go far beyond the normal stock capabilities. If you’re looking to take your app to the next level, an extension host platform can add great value and longevity.
On the other side, as an App Extension provider you can integrate with other apps that have extension platforms to increase the value of your app, create better experiences for your users, or to create a new experience for that app.
Where can I learn more?
We have a build session on App Extensions. That is a great place to start, along with our github sample for the app extensions we featured in the session.
(Note: links to the samples for individual extensions are found in the Readme)
If you have an App Extension question or topic, please let me know in the comments!
– David Bennett, Program Manager, Windows Developer Platform