PHPackages                             hihebark/pushok - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. hihebark/pushok

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

hihebark/pushok
===============

PHP client for Apple Push Notification Service (APNs) - Send push notifications to iOS using the new APNs HTTP/2 protocol with token-based (JWT with p8 private key) or certificate-based authentication

0.17.0(1y ago)03MITPHPPHP ^8.1

Since Feb 2Pushed 10mo agoCompare

[ Source](https://github.com/hihebark/pushok)[ Packagist](https://packagist.org/packages/hihebark/pushok)[ Docs](https://github.com/hihebark/pushok)[ RSS](/packages/hihebark-pushok/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Pushok
======

[](#pushok)

[![PHP >= 8.1](https://camo.githubusercontent.com/2d18ce514c7016022dad012ac9e39a8b6f47cc411b2daff6627cbf208f8cea63/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Build Status](https://camo.githubusercontent.com/f9f70a32d722eb9c985a5dd0af19b0e7fde2aa4efa4e97f0ea08db0aa22da3a5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6564616d6f762f707573686f6b2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/edamov/pushok)[![Latest Version on Packagist](https://camo.githubusercontent.com/c6dfe1ad697f9b417762d2a267a01c17cabbbeba29cd18b78a3199bd39025e2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6564616d6f762f707573686f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/edamov/pushok)[![Total Downloads](https://camo.githubusercontent.com/dbfec97a693193353310e10e508c69339ce2b5bdd670f68cbe7bb773a04e5b89/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6564616d6f762f707573686f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/edamov/pushok)[![Coverage Status](https://camo.githubusercontent.com/605ebda7a89f7f102611c4c128e1c98741e6fc94a80027c7aa8b36d5984c6756/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6564616d6f762f707573686f6b2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/edamov/pushok?branch=master)[![Quality Score](https://camo.githubusercontent.com/019dad268aa915806e78b90a1ea91484e96d30dad90ab55e3c6b14493b7b0b58/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6564616d6f762f707573686f6b2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/edamov/pushok)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

Do you like the library? Please consider [donating](https://www.buymeacoffee.com/uasupport) to support Ukraine 🇺🇦
-----------------------------------------------------------------------------------------------------------------

[](#do-you-like-the-library-please-consider-donating-to-support-ukraine-)

Pushok is a simple PHP library for sending push notifications to APNs.

Features
--------

[](#features)

- Uses new Apple APNs HTTP/2 connection
- Supports JWT-based authentication
- Supports Certificate-based authentication
- Supports new iOS 10 features such as Collapse IDs, Subtitles and Mutable Notifications
- Uses concurrent requests to APNs
- Tested and working in APNs production environment

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- lib-curl &gt;= 7.46.0 (with http/2 support enabled)
- lib-openssl &gt;= 1.0.2e

Docker image that meets requirements can be found [here](https://hub.docker.com/r/edamov/pushok-docker). Or you can follow [this tutorial](https://nathanleclaire.com/blog/2016/08/11/curl-with-http2-support---a-minimal-alpine-based-docker-image/) to create your own docker image with curl with HTTP/2 support.

Install
-------

[](#install)

Via Composer

```
$ composer require hihebark/pushok
```

Getting Started
---------------

[](#getting-started)

Using JWT token. See [Handling Notification Responses from APNs](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/handling_notification_responses_from_apns) for more info.

```
