kishore
kishore

Reputation: 386

iOS safari add to home screen of my angular web app icon coming as screenshot instead of apple-touch-icon

When I'm trying to add my angular web app as a shortcut to my home screen from my iOS safari it is coming as a screenshot of my app page, although I added an apple-touch-icon link to my index.html. where my image is 150*150 size and a png. below is my HTML code

<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>Insights</title>
  <base href="/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="src/assets/icons/favicon-32x32.png">
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&amp;display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="manifest" href="manifest.webmanifest">
  <link rel="apple-touch-icon" href="src/assets/icons/apple-touch-icon-150x150.png">
  <meta name="theme-color" content="#1976d2">
</head>

<body>
  <app-root></app-root>
  <noscript>Please enable JavaScript to continue using this application.</noscript>
</body>

</html>

Upvotes: 1

Views: 2944

Answers (1)

kishore
kishore

Reputation: 386

After some research found that it is my bad having src in the below line.

<link rel="apple-touch-icon" href="src/assets/icons/apple-touch-icon-150x150.png">

changed it to the below worked

<link rel="apple-touch-icon" href="/assets/icons/apple-touch-icon-150x150.png">

Upvotes: 5

Related Questions