PHPackages                             codingwithrk/package-info - 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. [API Development](/categories/api)
4. /
5. codingwithrk/package-info

ActiveNativephp-plugin[API Development](/categories/api)

codingwithrk/package-info
=========================

A NativePHP Mobile plugin provides an API for querying information about an application package.

v1.0.0(4mo ago)21431MITPHPPHP ^8.2

Since Feb 26Pushed 2mo agoCompare

[ Source](https://github.com/codingwithrk/package-info)[ Packagist](https://packagist.org/packages/codingwithrk/package-info)[ RSS](/packages/codingwithrk-package-info/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

PackageInfo Plugin for NativePHP Mobile
=======================================

[](#packageinfo-plugin-for-nativephp-mobile)

[![Latest Version](https://camo.githubusercontent.com/258dee50ac8ce7576859cf06e4b0e9f4728376d8935cb8659d58df5d26bfbe00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64696e6777697468726b2f7061636b6167652d696e666f3f7374796c653d706c6173746963)](https://packagist.org/packages/codingwithrk/package-info)[![Packagist Downloads](https://camo.githubusercontent.com/fdc1ded1c61e3bdba9418c079f8a542b8363ee2fc1a464ef08d2bbfb997704fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64696e6777697468726b2f7061636b6167652d696e666f3f7374796c653d706c6173746963)](https://camo.githubusercontent.com/fdc1ded1c61e3bdba9418c079f8a542b8363ee2fc1a464ef08d2bbfb997704fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64696e6777697468726b2f7061636b6167652d696e666f3f7374796c653d706c6173746963)[![License](https://camo.githubusercontent.com/24dce7920d646828b6cad44a41e6e7b77c1f6488989b3d9cd80c6cd0622c2241/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f64696e6777697468726b2f7061636b6167652d696e666f3f7374796c653d706c6173746963)](https://camo.githubusercontent.com/24dce7920d646828b6cad44a41e6e7b77c1f6488989b3d9cd80c6cd0622c2241/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f64696e6777697468726b2f7061636b6167652d696e666f3f7374796c653d706c6173746963)

A NativePHP Mobile plugin that provides an API for querying application package information — similar to Flutter's `package_info_plus`.

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

[](#installation)

```
composer require codingwithrk/package-info

php artisan native:plugin:register codingwithrk/package-info
```

The service provider is auto-discovered by Laravel.

Usage
-----

[](#usage)

### Via Facade

[](#via-facade)

```
use Codingwithrk\PackageInfo\Facades\PackageInfo;

$info = PackageInfo::getInfo();

if ($info) {
    echo $info->appName;        // "My App"
    echo $info->packageName;    // "com.example.myapp"
    echo $info->version;        // "1.2.3"
    echo $info->buildNumber;    // "42"
    echo $info->installerStore; // "com.android.vending" (Android) or "" (iOS)
}
```

> `getInfo()` returns `null` when called outside a NativePHP Mobile environment.

### Returned Data

[](#returned-data)

`getInfo()` returns a `PackageInfoData` value object with the following properties:

PropertyTypeDescription`appName``string`Human-readable application name`packageName``string`Unique app identifier (bundle ID on iOS, application ID on Android)`version``string`Marketing version string (e.g. `"1.2.3"`)`buildNumber``string`Build/version code as a string (e.g. `"42"`)`installerStore``string`Package name of the installing store, or empty string if unknown/not applicableYou can also convert the data to an array:

```
$array = $info->toArray();
// ['appName' => '...', 'packageName' => '...', 'version' => '...', 'buildNumber' => '...', 'installerStore' => '...']
```

Listening for Events
--------------------

[](#listening-for-events)

After `getInfo()` successfully retrieves data, a `PackageInfoRetrieved` event is dispatched. You can listen for it in a Livewire component using the `#[OnNative]` attribute:

```
use Codingwithrk\PackageInfo\Events\PackageInfoRetrieved;
use Codingwithrk\PackageInfo\PackageInfoData;
use Native\Mobile\Attributes\OnNative;

#[OnNative(PackageInfoRetrieved::class)]
public function handlePackageInfoRetrieved(PackageInfoData $info): void
{
    $this->appName     = $info->appName;
    $this->version     = $info->version;
    $this->buildNumber = $info->buildNumber;
}
```

Platform Support
----------------

[](#platform-support)

PlatformSupportedAndroidYesiOSYesSupport
-------

[](#support)

For questions or issues, email

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance81

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

126d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/107883290?v=4)[CodingwithRK](/maintainers/CodingwithRK)[@codingwithrk](https://github.com/codingwithrk)

---

Top Contributors

[![codingwithrk](https://avatars.githubusercontent.com/u/107883290?v=4)](https://github.com/codingwithrk "codingwithrk (7 commits)")

---

Tags

nativephpnativephp-mobilenativephp-plugin

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/codingwithrk-package-info/health.svg)

```
[![Health](https://phpackages.com/badges/codingwithrk-package-info/health.svg)](https://phpackages.com/packages/codingwithrk-package-info)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k13](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
