Open harvinders opened 3 years ago
@DrusTheAxe - is this in your area?
Allow optional packages to define custom meta data in a manner similar to app extensions
One solution is to support a package-scope equivalent to <Extension Category="windows.appExtension">
and all that implies
Add support for package-scope manifested data, e.g.
<Package>
<Extensions>
<Extension Category="windows.packageExtension"...>
Add APIs equivalent to Windows.ApplicationModel.AppExtensions and AppExtensionCatalog. Functionally the API could be similar (nigh identical?) except...
a. AppExtension.GetExtensionPropertiesAsync returns the package-scope <Extension>
's data rather than a per-app's <Extension>
data.
b. Remove .AppInfo
Otherwise you could rename AppExtension[[Catalog]] to PackageExtension[[Catalog]] and get the desired result.
@harvinders would that satisfy the proposal?
@DrusTheAxe. Yes, it would satisfy the need. Just wanted to understand why do you propose to remove AppInfo
? seems like useful information to allow the main app to enquire.
@harvinders sorry I overlooked your message. Let's fix that...
why do you propose to remove AppInfo?
Because package != application
A Package contains 0-100 applications so we need to get 'the list of apps', not 'the app'.
The obvious answer is to replace .AppInfo
with .Package
. But lo' and behold, AppExtension already has a .Package
property!
Given a Package object you can get the list of apps it provides so today given AppExtension we can...
appextension.AppInfo
appextension.Package
FOREACH ale IN appextension.Package.GetAppListEntries()
appinfo = ale.AppInfo
We can have the equivalent model with a PackageExtension object
packageextension.Package
FOREACH ale IN packageextension.Package.GetAppListEntries()
appinfo = ale.AppInfo
Proposal: Support custom metadata field for optional packages (and possibly other type of packages)
Summary
Allow main package to selectively load optional packages by querying exposed custom metadata as available in app extensions, without the need to load the code from optional packages. This would immensely help apps with plugin architecture.
Rationale
Scope
Important Notes
Example shared in the #81
Open Questions