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

PWAのインストールボタンを作る #13198

Open
1 task
kakkokari-gtyih opened this issue Feb 8, 2024 · 11 comments
Open
1 task

PWAのインストールボタンを作る #13198

kakkokari-gtyih opened this issue Feb 8, 2024 · 11 comments
Labels
✨Feature This adds/improves/enhances a feature

Comments

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Feb 8, 2024

Summary

window.$clientPWA = null;
window.addEventListener('beforeinstallprompt', (e) => { window.$clientPWA = e;});

function onclick() {
    window.$clientPWA != null ? window.$clientPWA.prompt() : alert('非対応');
}

っていう実装をやる(実際にはwindowにこんなプロパティを置く必要はない)(Chrome系では動く)

Purpose

PWAのインストール方法がわかりにくすぎる

Do you want to implement this feature yourself?

  • Yes, I will implement this by myself and send a pull request
@kakkokari-gtyih kakkokari-gtyih added the ✨Feature This adds/improves/enhances a feature label Feb 8, 2024
@kakkokari-gtyih
Copy link
Contributor Author

kakkokari-gtyih commented Feb 8, 2024

@samunohito
Copy link
Member

Safari…

@kakkokari-gtyih
Copy link
Contributor Author

非対応の場合はこうするか

https://zenn.dev/kodai/articles/be376a8ea8e071#%E5%9B%9E%E9%81%BF%E7%AD%96

@acid-chicken
Copy link
Member

w3c/manifest#835 によれば削除された仕様みたいだしあまり気乗りしない感はある(し Safari に文句を言うのは筋違い感)

@samunohito
Copy link
Member

beforeinstallprompt、W3Cから消えたんだ…Chromium系もどうなるか分からないし、怪しいかも

@tamaina
Copy link
Contributor

tamaina commented Feb 8, 2024

PWAのインストール方法がわかりにくすぎる

ほんまか???(ChromeとかEdgeはうざいほどアプリインストールを推奨してくるイメージがある

@tamaina
Copy link
Contributor

tamaina commented Feb 8, 2024

Safariは導線ゼロだけど

@kakkokari-gtyih
Copy link
Contributor Author

Safariは導線ゼロだけど

主にSafariの導線をどうにかしたい

@tamaina
Copy link
Contributor

tamaina commented Feb 8, 2024

w3c/manifest#836

@kakkokari-gtyih
Copy link
Contributor Author

w3c/manifest#836

非対応の場合はこうするか

https://zenn.dev/kodai/articles/be376a8ea8e071#%E5%9B%9E%E9%81%BF%E7%AD%96

のように手動での操作方法を埋め込むしかなさそう

@tamaina
Copy link
Contributor

tamaina commented Feb 8, 2024

手動での操作方法をSafari限定で出すのはいいと思う

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature
Projects
Status: Todo
Development

No branches or pull requests

4 participants