PHPackages                             bhargavdetroja/nativephp-all-permission-handle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bhargavdetroja/nativephp-all-permission-handle

ActiveNativephp-plugin[Utility &amp; Helpers](/categories/utility)

bhargavdetroja/nativephp-all-permission-handle
==============================================

A NativePHP Mobile plugin for all type of permission mobile permitions

v1.0.2(1mo ago)07MITPHPPHP ^8.2

Since Apr 15Pushed 1mo agoCompare

[ Source](https://github.com/BhargavDetroja/nativephp-all-permission-handler)[ Packagist](https://packagist.org/packages/bhargavdetroja/nativephp-all-permission-handle)[ RSS](/packages/bhargavdetroja-nativephp-all-permission-handle/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

AllPermissionHandler for NativePHP Mobile
=========================================

[](#allpermissionhandler-for-nativephp-mobile)

Runtime permission checks and requests for **iOS and Android** from your Laravel app. The API is aligned with Flutter’s **`permission_handler`** naming so the same permission strings work across PHP and JavaScript.

**Package:** `bhargavdetroja/nativephp-all-permission-handle`
**Requires:** [NativePHP Mobile v3](https://nativephp.com/docs/mobile/3/getting-started/installation), PHP 8.2+

---

Table of contents
-----------------

[](#table-of-contents)

1. [Quick start (7 steps)](#quick-start-7-steps)
2. [What this plugin does](#what-this-plugin-does)
3. [Requirements](#requirements)
4. [Installation](#installation)
5. [Configure permissions](#configure-permissions)
6. [After you change config](#after-you-change-config)
7. [Verify everything works](#verify-everything-works)
8. [Examples](#examples)
9. [API reference](#api-reference)
10. [Permission names (PHP and JS)](#permission-names-php-and-js)
11. [Status codes](#status-codes)
12. [Platform behaviour](#platform-behaviour)
13. [How builds use your config](#how-builds-use-your-config)
14. [Troubleshooting](#troubleshooting)
15. [Store &amp; compliance](#store--compliance)
16. [Developing this plugin](#developing-this-plugin)
17. [Changelog &amp; license](#changelog--license)

---

Quick start (7 steps)
---------------------

[](#quick-start-7-steps)

Do these in your **Laravel app that already uses NativePHP Mobile** (not inside this package’s repo).

StepAction1`composer require bhargavdetroja/nativephp-all-permission-handle`2`php artisan vendor:publish --tag=nativephp-plugins-provider`3`php artisan native:plugin:register bhargavdetroja/nativephp-all-permission-handle`4`php artisan vendor:publish --tag=all-permission-handler-config`5Edit `config/all-permission-handler.php` — set `enabled_permissions` and `ios_usage_descriptions` for what you use (see [Configure permissions](#configure-permissions))6`php artisan native:plugin:list` — confirm the plugin appears7Rebuild and run the native app (`php artisan native:run` or your usual iOS/Android flow)If any step fails, see [Troubleshooting](#troubleshooting).

---

What this plugin does
---------------------

[](#what-this-plugin-does)

- **Check** permission state (`check` / `status`)
- **Request** one or many permissions (`request`, `requestMultiple`)
- **Service status** where it applies (e.g. location services, notifications on some platforms)
- **Open app settings** (`openAppSettings`)
- **Android:** `shouldShowRequestRationale` (iOS returns `false`)

By default **no** permissions are enabled until you list them in config (safe for stores and security).

---

Requirements
------------

[](#requirements)

- Laravel application with **`nativephp/mobile` ^3.0** installed and project scaffolded (`native:install` or current NativePHP docs).
- Without NativePHP Mobile, Composer may still download this package, but **native code will not build** and you will see errors about missing providers or bridge classes.

---

Installation
------------

[](#installation)

Run commands **in order**. Skipping an early step causes confusing errors later.

### 1. Install the Composer package

[](#1-install-the-composer-package)

```
composer require bhargavdetroja/nativephp-all-permission-handle
```

### 2. Publish NativePHP’s plugin provider

[](#2-publish-nativephps-plugin-provider)

Creates `app/Providers/NativeServiceProvider.php` (or equivalent). **Required before** `native:plugin:register`.

```
php artisan vendor:publish --tag=nativephp-plugins-provider
```

### 3. Register this plugin

[](#3-register-this-plugin)

Registers native (Swift/Kotlin) code for the next build.

```
php artisan native:plugin:register bhargavdetroja/nativephp-all-permission-handle
```

### 4. Publish this plugin’s config

[](#4-publish-this-plugins-config)

```
php artisan vendor:publish --tag=all-permission-handler-config
```

### 5. Confirm registration

[](#5-confirm-registration)

```
php artisan native:plugin:list
```

You should see `bhargavdetroja/nativephp-all-permission-handle` (or the registered name) in the list.

---

Configure permissions
---------------------

[](#configure-permissions)

Edit **`config/all-permission-handler.php`**.

### Minimal example (camera + microphone)

[](#minimal-example-camera--microphone)

```
