Set Up Your Hybrid Development Environment
- The software setup required for hybrid development.
- How to check for preinstalled software.
- How to install missing software.
- Successful completion of step 1, Install Common Requirements.
- One of the following:
- A Mac OS X development machine and successful completion of step 2, Install the Android Development Environment, or step 3, Install the iOS Development Environment, or both.
- A Windows development machine and successful completion of step 2, Install the Android Development Environment.
If you’ve made it this far, congratulations! You’re ready to create native apps for Android, iOS, or both. You’re also perfectly positioned to install the tools for developing Mobile SDK hybrid apps.
Hybrid development requires the Mobile SDK common software and at least one native development environment—Android on Windows; Android, iOS, or both on Mac OS X. If you jumped into this project here, without doing any of the previous steps, go back and start at step 1. Then continue to a native development installation before returning here.
Once you’ve installed either the Android or the iOS development environment, enabling the hybrid option is easy. The only missing pieces are the Cordova command-line interface (CLI) and the forcehybrid npm utility.
You can develop hybrid apps on either Mac or Windows development machines, but you can’t do in-depth iOS development on a Windows machine.
To check if Cordova is already installed, type at the OS command prompt: cordova -version
- If this command reports version 8.1.2 or later, proceed to step 6. If it reports an earlier version, continue to the next step.
- If you get a “command not found” error message, continue to step 3.
- If Cordova prompts you to configure telemetry, type cordova telemetry off or cordova telemetry on
Remove the existing version.
- On a Mac, type sudo npm uninstall -g cordova
- On Windows, type npm uninstall -g cordova
Install the required version.
- On a Mac, type sudo npm install -g email@example.com
- On Windows, type npm install -g firstname.lastname@example.org
- When the installer finishes, type cordova telemetry off
- Return to step 1 to verify your installation.
To install forcehybrid, run the npm install
- On Windows, type npm install -g forcehybrid and press Return.
- On a Mac, type sudo npm install -g forcehybrid and press Return.
- If prompted on a Mac, enter your system password.
To test your installation, type forcehybrid version and
$ forcehybrid version forcehybrid version 6.0.0 $
Your command-line printout should reflect the Mobile SDK version—currently, forcehybrid version 7.0.x.
Congratulations! If you’ve completed this step, you’re ready to create hybrid apps. To get started, use the forcehybrid create command and specify either hybrid_local or hybrid_remote as the app type.
Remember, if you installed only one native development environment, you can come back at any time to install the other one. Just check to be sure that your current Mobile SDK components are up to date with the versions listed in this project.
We won’t check any of your setup. Click Verify Step.