๐Ÿš€ Launch mobile apps 10x faster with Next.jsGet NextNative โ†’
๐Ÿ“ Rename your app

Rename your app (by default itโ€™s NextNative)

iOS

๐Ÿ’ก

Don't forget to run the following command whenever you make changes to the code before deploying:

npm run mobile

  1. Open your project in Xcode by running:
npx cap open ios
  1. Select the App project, and double-click the App target to rename. Rename Bundle Identifier to be com.[yourappnamelowercase].app:

Create a product
  1. Open Info tab, go to Bundle display name and rename there.

Create a product
  1. Then, open ios/App/Podfile and rename the current target at the bottom of the file: ๏ฟผ

Create a product
  1. And also in capacitor.config.js:

Create a product

Android

๐Ÿ’ก

Don't forget to run the following command whenever you make changes to the code before deploying:

npm run mobile

Renaming

  1. To change your app's Package ID (aka Application ID for Android), edit applicationId and namespace at the top of android/app/build.gradle:
android {
  -       namespace "com.nextnative.app"
  +       namespace "com.mycompany.appname"
  defaultConfig {
  -       applicationId "com.nextnative.app"
  +       applicationId "com.mycompany.appname"
  }
}
  1. Then change the value for app_name, title_activity_main, package_name, and custom_url_scheme in android/app/src/main/res/values/strings.xml:
<string name="app_name">MyApp</string>
<string name="title_activity_main">MyApp</string>
<string name="package_name">com.mycompany.appname</string>
<string name="custom_url_scheme">com.mycompany.appname</string>
  1. Also in capacitor.config.js:

Create a product
  1. And finally rename a package name in Android Studio.

Right-click the package (e.g. com.nextnative.app)

Select Refactor โ†’ Rename...


Create a product

Enter your new package name: com.yourcompany.appname


Create a product
โš ๏ธ

If that didnโ€™t work for some reason, rename android/src/main/java/com/[yourcompany]/[appname] path yourself.

Then change โ€œpackageโ€ in android/src/main/java/com/[yourcompany]/[appname]/MainActivity.java to your new appโ€™s package name.

๐Ÿงผ Final Step: Clean + Invalidate Caches (Do NOT skip this)

After changing your appโ€™s package name, namespace, and Java folder structure, Android Studio might still hold on to outdated paths or cached builds. This can lead to strange build errors or the old app ID being used silently.

1. Clean the Project

Menu โ†’ Build โ†’ Clean Project

This removes stale build files.

2. Invalidate Caches and Restart IDE

Menu โ†’ File โ†’ Invalidate Caches

Then click:

๐ŸŸฆ Invalidate and Restart

Android Studio will wipe its internal caches, restart, and rebuild everything from scratch using the new package name and paths.


NextNative Docs