laraveldaily/mobile-reactnative-flutter-nativephp-course-demo/nativephp-mobile

Claude Code and agent skill by laraveldaily/mobile-reactnative-flutter-nativephp-course-demo

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Builds native iOS and Android apps with PHP & Larvel. Activate when using native device APIs (camera, dialog, biometrics, scanner, geolocation, push notifications), EDGE components (bottom-nav, top-bar, side-nav), `#nativephp` JavaScript imports, native mobile events, NativePHP Artisan commands (native:run, native:install, native:watch), deep links, secure storage, or mobile app deployment.

Install

npx vskill@latest install laraveldaily/mobile-reactnative-flutter-nativephp-course-demo/nativephp-mobile

SKILL.md

NativePHP Mobile v3

Documentation

Before implementing any feature, fetch the relevant docs using WebFetch. Find the right URL in references/available-docs.md.

WebFetch("https://nativephp.com/docs/mobile/3/apis/camera", "Explain Camera API methods, events, and fluent builder options")

Build Commands — Tell the User, Don't Run

Never auto-run these commands. Always tell the user to run them manually:

bash
npm run build -- --mode=ios # or --mode=android
php artisan native:run ios # or android
php artisan native:watch
./native open
./native watch

Environment Detection

Before suggesting commands, determine:

  1. OS: macOS supports iOS + Android. Windows/Linux support Android only. WSL unsupported.
  2. Frontend stack: Livewire/Blade (.blade.php with wire:, app/Livewire/) vs JavaScript (.vue/.jsx/.tsx, inertiajs in package.json).

Required Environment Variables

Set in .env before php artisan native:install:

dotenv
NATIVEPHP_APP_ID=com.yourcompany.yourapp
NATIVEPHP_APP_VERSION="DEBUG"
NATIVEPHP_APP_VERSION_CODE="1"
# Optional for iOS:
NATIVEPHP_DEVELOPMENT_TEAM=XXXXXXXXXX

Artisan Commands Reference

CommandPurpose
php artisan native:installInstall/upgrade native shell
php artisan native:run ios/androidBuild and launch on simulator/emulator
php artisan native:watchHot reload during development
php artisan native:jumpQuick restart without full rebuild
php artisan native:tailStream device logs
php artisan native:packagePackage for App Store / Play Store

HMR with Vite works when npm run dev runs alongside native:run.

Vite Configuration

javascript
import { nativephpMobile, nativephpHotFile } from './vendor/nativephp/mobile/resources/js/vite-plugin.js';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
hotFile: nativephpHotFile(),
}),
tailwindcss(),
nativephpMobile(),
]
});

JavaScript Usage (Vue/React/Inertia)

javascript
import { camera, dialog, scanner, biometric, on, off, Events } from '#nativephp';
await camera.getPhoto();
await dialog.alert('Title', 'Message');
await scanner.scan().prompt('Scan ticket').formats(['qr', 'ean13']);
await biometric.prompt().id('auth-check');

Event handling — always clean up in onUnmounted:

javascript
const handler = (payload) => { /* handle */ };
on(Events.Camera.PhotoTaken, handler);
// onUnmounted:
off(Events.Camera.PhotoTaken, handler);

PHP Usage (Livewire/Blade)

Core Facades (Native\Mobile\Facades): Camera, Dialog, Biometrics, Network, SecureStorage, File, Share, Haptics, System, Device

Plugin Facades (separate packages): Browser, Scanner, Microphone, Geolocation, PushNotifications

php
use Native\Mobile\Attributes\OnNative;
use Native\Mobile\Events\Camera\PhotoTaken;
#[OnNative(PhotoTaken::class)]
public function handlePhoto(string $path): void
{
// Process photo at $path
}

Event Handling

  • Sync returns directly: SecureStorage::get(), Network::status()
  • Async dispatches events: Camera::getPhoto() dispatches PhotoTaken
  • Custom events: ->event(CustomEvent::class) (PHP) or .event('App\\Events\\Custom') (JS)
  • Events dispatch to both JS and PHP simultaneously

EDGE Components (Native UI)

EDGE renders Blade components as native UI. Works with both Livewire and Inertia (layout is Blade).

  • Prefix: native:bottom-nav, native:top-bar, native:side-nav
  • Child items require unique id attributes
  • Add nativephp-safe-area class to body for notch handling
blade
<native:bottom-nav>
<native:bottom-nav-item id="home" icon="home" label="Home" :url="route('home')" />
<native:bottom-nav-item id="profile" icon="person" label="Profile" :url="route('profile')" />
</native:bottom-nav>

Plugin System (v3)

Modular plugin architecture — device features as separate Composer packages:

PackageFeatureCost
nativephp/mobile-browserIn-app browser, OAuthFree
nativephp/mobile-cameraCamera & photo pickerFree
nativephp/mobile-dialogAlerts & toastsFree
nativephp/mobile-deviceVibrate, flashlight, device infoFree
nativephp/mobile-fileFile move/copyFree
nativephp/mobile-microphoneAudio recordingFree
nativephp/mobile-networkNetwork statusFree
nativephp/mobile-shareShare URLs & filesFree
nativephp/mobile-systemOpen app settingsFree
nativephp/mobile-scannerQR/barcode scanning$49
nativephp/mobile-biometricsFace ID / Touch ID$49
nativephp/mobile-geolocationGPS location$49
nativephp/mobile-secure-storageKeychain/Keystore$49
nativephp/mobile-firebasePush notificationsProprietary

For authoring plugins: references/plugin-best-practices.md

Common Pitfalls

  • Missing NATIVEPHP_APP_ID in .env before native:install
  • Suggesting iOS commands on Windows/Linux
  • Not cleaning up event listeners with off() in onUnmounted
  • Missing unique id on EDGE component children
  • Forgetting nativephp-safe-area class on body
  • Using core facades for plugin features (e.g. Scanner requires nativephp/mobile-scanner)
  • Forgetting nativephpMobile() / nativephpHotFile() in vite.config.js
  • Not passing --mode=ios or --mode=android to npm run build
  • Not fetching v3 docs before implementing — use WebFetch with URLs from references/available-docs.md

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/laraveldaily/mobile-reactnative-flutter-nativephp-course-demo/nativephp-mobile/badge)](https://verified-skill.com/skills/laraveldaily/mobile-reactnative-flutter-nativephp-course-demo/nativephp-mobile)

Something wrong with this skill or its page? Tell us.