Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web Install] How do related applications impact these APIs? #790

Open
mhochk opened this issue Apr 18, 2024 · 3 comments
Open

[Web Install] How do related applications impact these APIs? #790

mhochk opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
Web Install API Declarative install for web apps from a web app.

Comments

@mhochk
Copy link
Contributor

mhochk commented Apr 18, 2024

The explainer calls out

When the related_applications and prefer_related_applications key/values are present in the manifest, the UA should try to handoff the install to the prefered catalog.

What should be the return value of install() in this case? And should future calls to getInstalledApps be expected to include information about this app?

My assumption would be that it is expected to behave like any other case, returning the manifest_id and appropriately including the manifest_id in future getInstalledApps calls, but it would be good to confirm.

@mhochk mhochk added the Web Install API Declarative install for web apps from a web app. label Apr 18, 2024
@amandabaker
Copy link
Member

amandabaker commented Apr 18, 2024

This is a great callout. I don't know if it would be guaranteed that the browser would be notified of the user either installing the app or rejecting installation, so I'm not sure how we would resolve/reject the promise in response to the install() request if we wait for some user action to happen.

One lazy option is to add another response type to indicate that the user was prompted to install a native app instead of the PWA, but that doesn't address the usability issue of the store not knowing whether to show an "Install" or "Open" button.

@diekus
Copy link
Member

diekus commented Apr 19, 2024

If I think about related_applications and try to understand its context, the options were to have an organically installed (yet generally lower quality "go" or "lite" version) from the browser or to somehow redirect the install invocation to a store to get the better full-blown experience.

The cross-origin install scenario was not a thing. A concern of mine is that on certain platforms the web installation will always redirect to the native store, but at the same time the data seems to indicate only 2% of manifest use the related_apps field which eases my concern.

Going back to the call out, there is no way that a web site will know anything about the app installation once/if it is being handed off to a native store. But, as far as the API is concerned (and I am very open to objections if this is not an acceptable outcome), once the installation is handed off to the store the promise should resolve. If there is any issue in this handoff then it should reject.

Do you agree here? I do not want a web site to be able to know if a native store installed or not an app, and if the field is present in the manifest I think there is an explicit intention from the developer to prefer the alternative app distribution channel.

@mhochk
Copy link
Contributor Author

mhochk commented Apr 19, 2024

I definitely agree that related_applications should be respected at install time.

From a privacy perspective I'm not overly concerned about a Store site being able to tell that a native app is installed. The Store has already been granted permission (by the WebApp developer and the user) to know if the WebApp is installed, and the manifest openly declares that it prefers a particular native app.

From an implementation perspective, integrating with native apps would be a complicated best-effort that I don't expect would have satisfactory solutions on all (any?) platforms.

Given that, I lean towards treating this just like an error/cancellation as far as the caller is concerned, and if it proves to be a real-world problem it can always be revisited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Install API Declarative install for web apps from a web app.
Projects
None yet
Development

No branches or pull requests

3 participants