Download the PHP package guppylab/plugin-push without Composer

On this page you can find all versions of the php package guppylab/plugin-push. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package plugin-push

Push — NativePHP Mobile plugin

Push notifications for NativePHP Mobile: direct APNs (.p8 key, no Firebase) on iOS and Firebase Cloud Messaging on Android.

The core nativephp/mobile package ships the PHP facade (PushNotifications::enroll/checkPermission/getToken), the JS bridge and the TokenGenerated event — but no native handlers, and no way to read what a push actually contains. This plugin fills both gaps on both platforms.

iOS Android
Transport APNs direct (.p8) Firebase Cloud Messaging
Token UNUserNotificationCenter + registerForRemoteNotifications() FirebaseMessaging
Foreground notification shown (willPresent) shown (FirebaseMessagingService)
Payload delivered to PHP ✅ MessageReceived ✅ MessageReceived
Tap delivered to PHP ✅ NotificationTapped ✅ NotificationTapped
Cold-start tap ✅ ✅ (carried on the launch intent)
Unenroll (logout) ✅ ✅ (deleteToken)
Badge ✅ ❌ no platform API
Provisional permission ✅ ❌ no equivalent

Installation

Register the service provider in the app's NativeServiceProvider::plugins():

Publish the config to change the notification channel or the status bar icon:

Usage

Enrolment, permission checks and token reads use the core's API — this plugin only makes them work natively:

Reading the push itself

MessageReceived fires for visible notifications received while the app is running and for data-only (silent) pushes. NotificationTapped fires when the user taps one, including the tap that cold-started the app.

Logout, badge, support

Remove the token from your backend before calling unenroll() — the device cannot forget it on the server's behalf, and afterwards you no longer know it.

Usage (JavaScript / Inertia — Vue or React)

The JS library ships TypeScript definitions and works across Livewire v3/v4 and Inertia (Vue/React).

iOS setup

The plugin declares the aps-environment entitlement in its manifest, so it is re-injected on every native:run --rebuild. The provisioning profile must include the Push Notifications capability.

No Firebase SDK is used on iOS: the backend talks to APNs directly with a .p8 key.

Sandbox builds. The entitlement is production, so tokens are production APNs tokens and the backend must talk to api.push.apple.com. If you need the sandbox (api.sandbox.push.apple.com) for debug builds, change ios.entitlements.aps-environment to development in the plugin manifest before building. A per-build-type entitlement is not expressible in the plugin manifest today.

Android setup

FCM requires google-services.json. It is not a plugin asset: the com.google.gms.google-services Gradle plugin expects it in the module root, and NativePHP copies it from nativephp/resources/google-services.json in the app. Drop the file there.

The plugin pulls in firebase-messaging, declares POST_NOTIFICATIONS (asked at runtime on API 33+) and registers PushMessagingService for com.google.firebase.MESSAGING_EVENT.

Foreground messages are rendered by the plugin on the configured channel. Background notification messages are rendered by FCM itself from the payload — those do not reach MessageReceived, by design of the platform, but a tap on them still produces NotificationTapped.

Notification channel and icon

Android freezes a channel's importance once it has been created, on purpose, so an app cannot escalate itself after the fact. Ship a new channel id when you need to change it.

A full-colour launcher icon is rendered as a white blob in the status bar, which is why small_icon exists. Leave it empty and the launcher icon is used.

Permission states

checkPermission() returns the PHP vocabulary granted|denied|not_determined, plus provisional|ephemeral on iOS.

On Android 13+ "never asked" is told apart from "denied" via shouldShowRequestPermissionRationale, so a soft-ask can show an "Enable" button instead of sending the user to Settings.

License

MIT


All versions of plugin-push with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
nativephp/mobile Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package guppylab/plugin-push contains the following files

Loading the files please wait ...