πŸš€ Launch mobile apps 10x faster with Next.jsGet NextNative β†’
πŸ“š Tutorials
⚑️ Ship in 5 minutes

Ship in 5 minutes

Let's get your mobile app running in 5 minutes ⚑️

We're going to use a production-ready template messenger app that I've included.

1. Prerequisite

⚠️

If you haven’t already, complete the Get Started tutorial first.


2. Run a mobile dev server

Use this command to start your mobile app in development mode. It handles:

  • Static builds
  • Next.js API support
  • Watching changes
  • Reloading updates
npm run mobile:dev

It starts a local server with Live Reload (opens in a new tab), to which a mobile app will be connected.

πŸ’‘

When you're ready to ship the production build to the App Store or Google Play, run:

npm run mobile

Then follow the Preparing for deployment (opens in a new tab) guide.

iOS

1. Open in Xcode

To launch the iOS app in a simulator:

npx cap open ios

Or simply open Xcode yourself and choose the nextnative/ios folder.

2. Run the Simulator

Click the ▢️ Run button in Xcode to boot your app.


Run an emulator in Xcode

πŸ•“ The first build might take a bit longer β€” Xcode will compile and set up your project.

βœ… All future reloads will be much faster.

Android

⚠️

Rename your app before setting up Firebase for Android.

1. Add a new Android app on Firebase

In the Firebase console (opens in a new tab):

  1. Click Add App β†’ Select Android
  2. Enter your app’s Package name (e.g. com.yourcompany.appname)
  3. (Optional) Add app nickname
  4. Click Register app

2. Download & place config file

  1. Download the google-services.json file
  2. Place it in:
android/app/google-services.json

3. Edit build.gradle

⚠️

It's already done in the latest update of NextNative, so if you have the latest version pulled, no need to do this.

Go to android/app/build.gradle and replace these lines:

try {
    def servicesJSON = file('google-services.json')
    if (servicesJSON.text) {
        apply plugin: 'com.google.gms.google-services'
    }
} catch(Exception e) {
    logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}

with only this one line:

apply plugin: 'com.google.gms.google-services'

4. Rerun a mobile dev server

npm run mobile:dev

5. Open in Android Studio

To launch an Android app in an emulator or a real device:

npx cap open android

Or simply open Android Studio yourself and choose the nextnative/ios folder.

6. Run

Click the ▢️ Run button in Android Studio to boot your app.


Run an emulator in Android Studio

Run your app on a real Android phone.

It’s the only way to test native Google login reliably on a Mac M1/M2 and many Windows PCs.

If you don't have an Android phone, no worries, you can test everything in a browser. But it's recommended to test on a real device before publishing an app.

You’re Live! πŸš€

That’s it, you’ve got a native mobile app running with Next.js in just a few minutes.

Go ahead and start building your own features:


Ship in 5 minutes

Next Steps

Now that your app is running, here’s what you can explore next:

Your app’s foundation is solid β€” time to build something amazing πŸ’‘

πŸ“š

Want to go deeper? Explore more tutorials like:

Every piece brings you closer to launching a full-featured mobile app.


NextNative Docs