Download the PHP package blessedzulu/nativephp-deeplinks without Composer

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

NativePHP Deep Links

Deep-link hardening for NativePHP Mobile. Two build-time fixes for Android deep links - no native SDK, no runtime cost.

You set up deep links so that links to your site open your app instead of the browser. On Android, NativePHP gets you most of the way there - but two things quietly go wrong:

  1. Your app claims your entire website. Not just the pages you meant - every link to your domain (blog posts, marketing pages, the lot) starts trying to open the app.
  2. Deep links that carry list data arrive empty. A link with array parameters - like a Livewire #[Url] public array - opens the app in the wrong state, with those values silently dropped.

This plugin fixes both, automatically, when you build. You don't call anything. iOS already handles both correctly, so it's left alone.

Features

Requirements

Installation

The plugin is auto-discovered by NativePHP (run php artisan native:plugin:list to confirm). Its work runs automatically on native:run and native:package, so there's nothing to call yourself.

Configuration

Tell it which paths should open your app, in config/nativephp-deeplinks.php:

Prefer env? Set the paths there instead:

Note: this plugin only handles path scoping and query handling. You still need NativePHP's own NATIVEPHP_DEEPLINK_HOST, plus your server-hosted assetlinks.json (Android) and apple-app-site-association (iOS), for deep links to verify in the first place.

The two fixes, in plain English

1. Your app shouldn't claim your whole website

Out of the box, NativePHP registers your Android app for every path on your verified domain (android:pathPrefix="/"). So once a user installs the app, tapping any link to your site - a blog post, your pricing page, an old marketing URL - offers to open the app, even for pages the app doesn't have.

This plugin rewrites the generated AndroidManifest.xml to register only the path prefixes you list in paths. Everything else stays in the browser, which is what you want.

2. Array query params get mangled on Android

When a deep link opens your app, Android's WebView rebuilds the request's query string using Android's own URL parser - and that parser mishandles bracketed keys like foo[0][bar], then re-serialises them without re-encoding. The result: array query parameters get corrupted on the way in.

The usual casualty is a Livewire #[Url] public array property - think an "add a row" form where each row serialises as allowances[0][type]=fixed. Scalar params survive the trip; array rows arrive empty, so the page loads with the wrong state. This plugin patches the generated Android code so the original, correctly-encoded query reaches PHP exactly as a browser would send it.

iOS needs neither fix: path scoping comes from the paths array in your apple-app-site-association file, and Swift preserves the encoded query already.

How it works

A post_compile hook runs after NativePHP generates the native project and before Gradle builds it, working on the generated Android source. Every transform is idempotent (safe to run again) and guarded: if an anchor it expects has moved in a newer NativePHP, it logs a warning and skips that transform rather than failing your build. In other words, an upstream change degrades to "unpatched" loudly, instead of breaking things silently.

Compatibility

Built for NativePHP Mobile ^3.0 (developed against 3.3.x). If NativePHP fixes these upstream - the query decoding is a genuine bug - this plugin simply becomes a no-op you can remove.

License

MIT © Blessed Zulu


All versions of nativephp-deeplinks with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
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 blessedzulu/nativephp-deeplinks contains the following files

Loading the files please wait ...