Guide for PhoneGap Desktop App Users

In this page, we will demonstrate a quick and easy steps to migrate a PhoneGap project into Monaca using Monaca Localkit. After finish this guide, you would be able to run, test/debug and build an app from your PhoneGap project using Monaca! Let’s get started!

Prerequisite

  1. Before starting the migration process, please make sure to read about the Key Differences in order to have a seamless migration.

  2. Download and install the latest version of Monaca Localkit here.

Importing PhoneGap project into Monaca Localkit

  1. Open Monaca Localkit and sign in with your Monaca account.

  2. Click on the + button. Then, select Import → From Local Cordova Project .

  3. Select your project directory and enter the project name.

Migration Steps

  1. Click OK to continue.

  2. Backup your project and click OK to continue.

  3. Click No since PhoneGap project is not a transpile project.

  4. Click OK and it’s done!

Debugging with Monaca Localkit

Monaca Debugger is an application for testing and debugging your Monaca apps on real devices in real-time. When developing Monaca apps on your local PC, assuming that your local PC is successfully paired with Monaca Debugger, all changes made to your project files will be pushed into your Monaca Debugger as soon as you save those changes.

Let’s get started with Monaca Debugger as follows:

  1. Install Monaca Debugger app on your device from Google Play or AppStore.

    If you want to install Monaca Debugger on Android emulator, please refer to Monaca Debugger for Android Emulator .
  2. Launch Monaca Debugger app and sign in with your Monaca account. Make sure you are using the same account for Monaca Localkit.

  3. Once logged in, Monaca Debugger should be able to detect the local PC. Then, a popup message prompting you to pair the debugger with the local PC will appear inside Monaca Debugger.

  4. If Monaca Debugger could not detect the local PC, please pay attention to the following points:

    • Monaca Debugger and the local PC have to connect to the same network connection (LAN or Wi-Fi).
    • Disable the local PC’s firewall.
  5. If your pairing is successful, your local project name will appear under Local Projects in Monaca Debugger. However, if you fail the pairing, please refer to Fail to Pair Monaca Debugger.

  6. To run a project, simply tap on the project name in Monaca Debugger (as shown in the above picture) or click on Run button in Monaca Localkit.

  7. Your project should now be running in the debugger. Go ahead and try out the various operations of your project! After that, try making some code changes and save them. Then, you should see the changes reflected in the debugger.

In order to stop debugging and unpair the debugger, please refer to Stop Pairing .

Building the app

After your app migration, let’s start building it. For simplicity, we only show how to create a debug build for Android in this guide.

  1. Before starting to build, you will need to upload your project to Monaca Cloud first by clicking on Upload button.

  2. Now, you can open the Build window by clicking on Remote Build button.

  3. The debug build is selected by default. Click Start Build.

  4. It may take several minutes for the build to complete. Please wait. The following screen will appear after the build is successfully completed. You can then choose various ways to install the build app into your device.

Where to go from here

To learn more about Monaca, please refer to the following materials: