Install Common Components
What You’ll Learn
In this step, you learn:
- The basic software used by Mobile SDK command-line scripts.
- How to check for pre-installed common software.
- How to install missing common software.
How Mobile SDK Setup Works
When you set up a Mobile SDK development environment, how you proceed depends on several questions:
What’s the OS of your development machine? Some operating systems limit your development options. Which mobile platforms do you plan to support? iOS, Android, or both? The answer can determine the type of development machine you need. Are you developing a native, hybrid, or React Native app? Native development requires a development environment for each mobile platform you’re supporting. Hybrid development requires at least one native development environment plus hybrid components. Similarly, React Native development requires at least one native development environment plus React Native components.All scenarios require some common components and at least one mobile platform development environment. The following matrix shows which components apply for each operating system.
Mac OS X Development Machine | Windows Development Machine | |
---|---|---|
Common components | Required. | Required. |
Android native components | Install one or both, depending on your requirements. Hybrid development requires at least one native environment. | Required. |
iOS native components | Not applicable. | |
Hybrid components | Required for hybrid development only. | Required for hybrid development only. |
React Native components | Required for React Native development only. | Required for React Native development only. |
About Common Components
The common components are:
- Node.js and the Node Package Manager (npm)
- Git command line
The minimum versions required by Mobile SDK 10.0.0 are:
- Node.js: 12.0 to latest LTS version
- npm 3.10 (installed with node.js)
- Git command line: latest
Let’s get going with common components.
Install Node.js with npm
- To check if node.js and npm are already installed, at the OS command prompt, type:
npm -v
- If this command reports version 3.10 or later, you’re done—proceed to the next installation.
- If the reported version is earlier than 3.10, continue to step 2.
- If you get a “command not found” error message, continue to step 2.
- In a web browser, go to nodejs.org.
- Download and run the latest LTS installer for your operating system.
- When the installer finishes, return to step 1.
Install the Git Command Line
- To check if git is already installed, at the OS command prompt, type:
git version
- If this command reports a git version such as “git version 2.10.1”, you’re done. Proceed to native Android or iOS environment setup.
- If you get a “command not found” error message, continue to step 2.
- Go to git-scm.com/downloads.
- Under Downloads, click the icon for your operating system.
- Run the installer.
- When the installer finishes, return to step 1. On Mac OS close the Terminal window and reopen it before retesting the version.
That’s it. We won’t check any of your setup. Click Verify Step to proceed to the next step in the project.