Black Friday: 40% off Bifrost Hela & Thor plans • Code: BLACKFRIDAY40
Ends in:
d
h
m
s

Quick Start


#Let's go!

If you've already got your environment set up to build mobile apps using Xcode and/or Android Studio, then you can get building your first mobile app with NativePHP in minutes:

#1. Update your composer.json

Add the NativePHP Composer repository:

Copied!
"repositories": [
{
"type": "composer",
"url": "https://nativephp.composer.sh"
}
]

Running Composer 2.9+?

If you're running Composer 2.9 or above, you can just use a single command, instead of copy-pasting the above:

Copied!
composer repo add nativephp composer https://nativephp.composer.sh

#2. Set your app's identifier

You must set a NATIVEPHP_APP_ID in your .env file:

Copied!
NATIVEPHP_APP_ID=com.cocacola.cokezero

#3. Install & run

Copied!
# Install NativePHP for Mobile into a new Laravel app
composer require nativephp/mobile
 
# Ready your app to go native
php artisan native:install
 
# Run your app on a mobile device
php artisan native:run

The native command

When you run native:install, NativePHP installs a native script helper that can be used as a convenient wrapper to the native Artisan command namespace. Once this is installed you can do the following:

Copied!
# Instead of...
php artisan native:run
 
# Do
php native run
 
# Or
./native run

#Need help?

  • Community - Join our Discord for support and discussions.
  • Examples - Check out the Kitchen Sink demo app on Android and iOS!