Overview
tether/nativephp-client is a commercial add-on that extends tether/client with NativePHP mobile offline sync triggers, app lifecycle awareness, connectivity awareness, and optional background scheduling.
It gives NativePHP apps sensible automatic sync triggers without asking you to wire them by hand.
What it provides
Without tether/nativephp-client, you manage sync manually: calling TetherClient::sync() from an Artisan command, a scheduled task, or in response to user action. That is enough for many desktop and server-side PHP contexts.
Mobile apps have a different rhythm. Users may open the app after days offline, connection quality changes often, and background work is limited. Your PHP application should be able to respond to those situations without caring about the platform details behind them.
tether/nativephp-client handles the common mobile sync triggers:
- Sync on app resume - dispatches
PushJobwhen the user opens the app again, with a configurable cooldown. - Sync on connectivity restored - dispatches
PushJobonce the device is back online. - Background sync - optionally schedules the full
tether:synccommand throughnativephp/mobile-background-tasks.
PHP events
The package exposes two Laravel events that you can subscribe to if your app needs custom behaviour:
| Event | When fired |
|---|---|
AppResumed | App becomes active again |
NetworkStatusChanged | Device network connectivity changes |
The built-in sync listeners are registered automatically. You only need to listen to these events for application-specific behaviour, such as updating an offline indicator or refreshing local UI state.
Requirements
tether/client(installed automatically as a dependency)- NativePHP Mobile v3+
- PHP 8.3+, Laravel 12 or 13
- For background sync:
nativephp/mobile-background-tasks(optional)
Licensing
tether/nativephp-client is a commercial package distributed through your Tether account. See the Add-ons page for details, or open My account to manage access and Composer credentials.
Configuration
Configure tether/server routes, middleware, sync keys, registered models, mutation storage, duplicate handling, and Laravel sync endpoint behaviour.
Setup
Install tether/nativephp-client, register the NativePHP mobile plugin, configure Composer access, and enable automatic sync in a NativePHP app.