-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
App icons (favicon, apple touch icon) missing with Metro bundler for web #21853
Comments
Some related documentation is here: This is what Expo previously generated for us before the switch, when setting just <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="/pwa/apple-touch-icon/apple-touch-icon-180.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png"> (somewhat related, the following meta tags are also missing: <meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-title" content="My App Name">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> ) |
I have the same issue. Did you find a solution? |
I was able to find a solution for this issue that worked for me. Documentation below: Additionally, I was able to successfully override the |
Hi, I am going to built to a PWA for my client but I am confused in picking up the technology for it. I was considering next but I came to know that apple allow PWA built with expo can any of you confirm this as of my previous experience with PWA I was able to get it published on playstore but was not able to get it published with appStore that PWA was built with react and was triggered by a WebView in an expo app. Can any one confirm that the PWA built with expo can be published on apple store? |
Favicons are now supported in Expo Metro with SDK 49. The static metatags should be added using the I'm not sure about adding support for the Apple splash screens since PWAs changed significantly and I haven't had time to research the new standard. |
I was just hit by this while migrating from Expo 48 to Expo 50 and switching to Metro. The suggested solution of using
Although I'm not sure how to re-generate the PWA images if my logo or splash images ever change.
|
I'm running into the same error! Were you able to find a solution? @findhumane |
Just the workaround that I mentioned |
If anyone runs into this error, below is my fix! added to my metro.config.js app.ts |
Summary
Icon are no longer included when switching from WebPack to the Metro bundler for web builds.
What platform(s) does this occur on?
Web
SDK Version
48
Environment
Minimal reproducible example
npx create-expo-app@1.3.2 expo-web-icons
cd expo-web-icons
"bundler": "metro",
after line 26 inapp.json
npx expo install react-native-web@~0.18.10 react-dom@18.2.0
npx expo export --platform web
dist/index.html
doesn't include any icon assets, nor anylink
elements pointing to iconsThe text was updated successfully, but these errors were encountered: