Develops native iOS and Android applications using Laravel and NativePHP. Use when asked to build mobile apps, access device hardware (camera, biometrics, location), or package Laravel apps for app stores.
Use this skill to build cross-platform mobile applications using PHP and Laravel.
Follow these steps to initialize a new mobile project:
Install Package
Run: composer require nativephp/mobile
Install Scaffold
Run: php artisan native:install
This creates configuration files and platform-specific directories.
Run Development Server
Run: php artisan native:run <ios,android>
Use the Jump companion app to test on devices instantly via QR code without recompiling.
Access device features using the provided facades.
use Native\Mobile\Facades\Biometric;
// Check availability
if (Biometric::isAvailable()) {
Biometric::prompt('Authenticate to continue');
}
use Native\Mobile\Facades\Geolocation;
$position = Geolocation::getCurrentPosition();
// Returns latitude, longitude, accuracy
<x-native::tab-bar>
<x-native::tab label="Home" icon="home">
<x-slot:content>
<!-- Home Content -->
</x-slot:content>
</x-native::tab>
<x-native::tab label="Settings" icon="cog">
<x-slot:content>
<!-- Settings Content -->
</x-slot:content>
</x-native::tab>
</x-native::tab-bar>
php artisan native:run <androdi,ios>.