audi2014 / push-adapter
send push notifications to fcm and apns in same interface
Installs: 256
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/audi2014/push-adapter
Requires
- php: ^7.0
- duccio/apns-php: ^1.0
This package is not auto-updated.
Last update: 2023-01-17 09:57:46 UTC
README
use Audi2014\PushAdapter\Apns; use Audi2014\PushAdapter\Fcm; (new Apns([ Apns::CONF_APP_CER => 'sandbox.cer', Apns::CONF_SANDBOX => true, ]))->sendByTokenArray([ '***TOKEN***', '***TOKEN***', '***TOKEN***', ],"adapterSandbox","adapterSandbox"); (new Apns([ Apns::CONF_APP_CER => 'prod.cer', Apns::CONF_SANDBOX => false, ]))->sendByTokenArray([ '***TOKEN***', '***TOKEN***', '***TOKEN***', ],"adapterProduction","adapterProduction"); (new Fcm([ Fcm::CONF_APP_KEY => '**', ]))->sendByTokenArray([ '***TOKEN***', '***TOKEN***', '***TOKEN***', ],"adapterFcm","adapterFcm");
#how to generate apns pem?
###DEV
openssl pkcs12 -in server_certificates_bundle_sandbox.p12 -out server_certificates_bundle_sandbox.pem -nodes -clcerts
###PROD
openssl pkcs12 -in server_certificates_bundle_production.p12 -out server_certificates_bundle_production.pem -nodes