# Safari support

### Safari > 16.4

Safari supports iOS push notifications from the version 16.4, however it requires the implementation of manifest.json file. You can setup your manifest.json yourself or generate it via any online service like: [Manifest Generator](https://www.simicart.com/manifest-generator.html/).

Your manifest attributes should contain:

* **$schema** (required)
* **display `standalone` or `fullscreen`** (required)
* **icons** to reference icons of several sizes (recommended)
* **id** (optional)

Example manifest file:

```json
{
  "$schema": "https://json.schemastore.org/web-manifest-combined.json",
  "display": "standalone",
  "start_url": "/",
  "name": "PPG Demo",
  "icons": [
    {
      "src": "/images/ca.png",
      "sizes": "40x40",
      "type": "image/png"
    }
  ]
}
```

#### Implementation

1. Once you have your manifest, add `manifest.json` to your root path of website. It must be accessible via `https://example.com/manifest.json`.&#x20;
2. Place index.html file in `<head>` section reference to manifest:

<pre class="language-html"><code class="lang-html"><strong>&#x3C;link rel="manifest" href="/manifest.json"/>
</strong></code></pre>

#### Testing

The implementation will work only if the website is **pinned** to home screen in iOS Safari.

1. Navigate to your website
2. Tap  "share" button
3. Tap "Add to Home Screen" option

Run the app pinned to the home screen.&#x20;

If you have completed all steps correctly, the web push subscription prompt will appear.

{% hint style="warning" %}
All Safari browser versions requires user gesture (click on desktop, tap on mobile device)  to display subscription prompt.
{% endhint %}

#### Invite users to pin your website to iOS home screen

If you wish to promote this feature in iOS Safari, you can use any open-source solution or create your own prompt to engage users. An example of such an implementation can be found in this repository: <https://github.com/rajatsehgal/add-to-home-screen>.

### Safari < 16

For old Safari versions authorization takes place via certificates. In order to integrate your project with APNs, you will need to request a certificate in a p.12 file format from a Certificate Authority in your Certificate Assistant first. [Check instruction here](/web-push/safari-support/safari-certificate.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pushpushgo.company/web-push/safari-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
