[w3c/manifest] Provide guidance to UAs on appropriate names for "platform" members (#862)

Currently, the [advice on what UAs should name their `platform` member](https://www.w3.org/TR/appmanifest/#platform-member-0) is fairly vague:

> A `platform` represents a software distribution ecosystem or possibly an operating system.

This has caused some recent confusion as [`getInstalledRelatedApps`](https://wicg.github.io/get-installed-related-apps/spec/) is being incubated, which uses the `platform` member of the `related_applications` member to determine whether to look at a particular app.

In particular, there is [confusion](https://bugs.chromium.org/p/chromium/issues/detail?id=1070693) as to whether to name the platform after the application store (e.g., `"play"`) or the operating system (e.g., `"android"`). Historically, Chrome has used `"play"`, but that was for promoting installation of a native application from the Play Store; now it seems `"play"` is being used by `getInstalledRelatedApps` to check for any Android APK, and it seems using the OS name would be more appropriate there. (Or, as @dominickng says on that thread, filter to only report apps installed by the Play Store.)

We could possibly offer more guidance around when to use the name of the store, and when to use the name of the OS. It's possible that both are appropriate, depending on the context.

Some possible text:

> A `platform` represents a software distribution ecosystem or operating system. The user agent SHOULD ignore objects whose `platform` is not recognized. A user agent may recognize `platform` values named after both software distribution ecosystems and the host operating system. If a `platform` value is named after a software distribution ecosystem (e.g., `"play"`), then it SHOULD only be used in contexts specific to that ecosystem. On the other hand, if a `platform` value is named after an operating system (e.g., `"android"`), then it SHOULD be used in all contexts within that host operating system.

This also means that the example under [purpose member](https://www.w3.org/TR/appmanifest/#purpose-member) is (retroactively) wrong: it uses `"play"` when talking about icons "specifically designed for the Android platform", when it should use `"android"`, since presumably that icon should also be seen when installed from another store. In general, it doesn't make sense for `ImageResource`s to have a store `platform`; they should always have OS `platform`s.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/862

Received on Monday, 4 May 2020 06:32:23 UTC