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(2mo ago)1271MITPHPPHP ^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 1mo ago

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

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

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

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
```

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 88% of packages

Maintenance84

Actively maintained with recent releases

Popularity13

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

81d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bb4ef593bedabe28ed3c56ee0af1e397428363e05236552b7de1fcdd4da5d93?d=identicon)[CodingwithRK](/maintainers/CodingwithRK)

---

Top Contributors

[![codingwithrk](https://avatars.githubusercontent.com/u/107883290?v=4)](https://github.com/codingwithrk "codingwithrk (3 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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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