Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Running NativePHP App: Build to Publish in App Stores

Premium
2 min read

From a code perspective, we have a fully functional application.

But now we have a question: How do we run it in a "Test" environment and launch it in an app store?


Running Local Variants

Running the application locally is as simple as running:

php artisan native:run

If you have it connected, you can play with your application in an emulator or on a real device.

The Full Lesson is Only for Premium Members

Want to access all of our courses? (31 h 16 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

LL
Leonel López ✓ Link copied!

Hi,

I'm currently testing a Mobile App connected to my Initial Web Application via API (http://talkapi.test/api). Everything works perfectly when testing in the browser.

However, when I run php artisan native:run locally and launch the Android emulator, I get the following error:

cURL error 6: Could not resolve host: talkapi.test

It seems the local API endpoint isn't accessible from the emulator environment using the local domain.

Do I need to host the API on a public server or use something like ngrok in order for the emulator to access it properly?

Thanks in advance for your help!

M
Modestas ✓ Link copied!

Hi, it seems that I missed the part in the course - will update!

But in general - yes, your API has to be publicly acessible. Ngrok works fine and that is what I was using.

Sorry about this missing detail!

LL
Leonel López ✓ Link copied!

Okay, no problem. Thank you very much for your response. I'm going to make the API public, and I'll wait for your update.

M
Modestas ✓ Link copied!

Updated the lessons to include notes about Ngrok :)

LL
Leonel López ✓ Link copied!

Thank you very much! I still can't find this note in the lesson?

M
Modestas ✓ Link copied!

It's a small one, just before the native:run command:

Note: If your API is running locally, remember to change the .env URL to Ngrok or a public one.
LL
Leonel López ✓ Link copied!

I saw it! Thank you for suggesting it.