Download the PHP package nativephp/mobile-vibe without Composer

On this page you can find all versions of the php package nativephp/mobile-vibe. 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 mobile-vibe

Vibe — websockets for NativePHP Mobile

Vibe brings live server events into your NativePHP Mobile app over the Pusher protocol — so it works with Vask, Laravel Reverb, or Pusher without changing your code. Your PHP components subscribe to channels and react to broadcasts, exactly like Laravel Echo does in the browser.

The websocket lives on the native side (Swift/Kotlin, via the official Pusher SDKs); PHP just declares what to subscribe to and handles the events.

Requirements

Install

Configure

Use the standard Laravel PUSHER_* vars in your app's .env (they're bundled into the app at build time):

The app secret is never shipped to the device.

If PUSHER_APP_KEY / PUSHER_HOST are missing when you subscribe on-device, Vibe throws a VibeException immediately rather than failing silently.

Public channels

Events arrive as native events and re-render the component. Match the event name to what your server broadcasts — without broadcastAs() that's the full class name (App\Events\OrderShipped), so use broadcastAs() to keep it short. Unlike Laravel Echo, do not prefix the name with a dot: Vibe matches the raw broadcast name ('OrderShipped', not '.OrderShipped').

Listeners are channel-scoped: an OrderShipped listener on orders never fires for a different channel that happens to broadcast the same event name.

You can also use an attribute instead of the fluent ->on() — pass the channel so the listener is scoped (use the full name as subscribed, e.g. private-orders.42 for Vibe::private('orders.42')):

Private channels

Private (private-) and presence (presence-) channels require a signed authorization from your remote Laravel backend. The default /broadcasting/auth route is session-guarded, which won't work for a mobile bearer token — register it under your API middleware instead:

Then point Vibe at it and give it the current bearer token:

Subscribing to a private/presence channel without VIBE_AUTH_ENDPOINT set throws a VibeException.

After a re-login / token refresh, push the new token to the live connection:

Presence channels

Presence channels track who's online. The auth response carries channel_data (user id + info); Vibe surfaces the roster and member changes:

On reconnect the SDKs re-subscribe and the here roster is delivered again — you don't need to rebuild presence state manually.

Whispers (client events)

Send ephemeral events directly to the other subscribers of a private/presence channel (no server round-trip, not persisted) — typing indicators, cursors:

Connection lifecycle & errors

Lifecycle

On your server

The app is a plain Pusher-protocol subscriber, so the server side is standard Laravel broadcasting. The three pieces Vibe cares about:

Whispers require client events to be enabled on your websocket server (Pusher: app settings → "Enable client events"; check your Reverb/Vask config).

Troubleshooting

Nothing arrives:

Private/presence fails: attach ->onError() — auth rejections arrive as auth_failed / subscription_failed with the reason. Usual suspects: expired bearer token, VIBE_AUTH_ENDPOINT pointing at a dead tunnel/host, or the backend route not guarded by an API (token) middleware.

Misconfiguration throws: missing PUSHER_APP_KEY/PUSHER_HOST, or a private/presence subscribe without VIBE_AUTH_ENDPOINT, throws VibeException at subscribe-time rather than failing silently.

Notes


All versions of mobile-vibe with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
nativephp/mobile Version ^4.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 nativephp/mobile-vibe contains the following files

Loading the files please wait ...