Accelerate the deployment of mobile games across a diverse spectrum of devices with Intel XDK, a free all-in-one HTML5 development environment that allows game developers to write a single app. The Intel® XDK IoT Edition distributed with IoTDK lets you create and run applications directly on Intel IoT platforms. This edition of Intel® XDK also provides. Intel XDK was an Integrated Development Environment created by Intel to create native apps for mobile phones and tablets using web technologies like HTML5, CSS and JavaScript. Apps were created edited and simulated using the IDE then exported to Adobe® PhoneGap or Cordova CLI for compilation into a native code app. The IDE allowed a developer. The Intel® XDK was discontinued in 2017 and is no longer being actively developed or updated. Below are alternative resources for building mobile HTML5 applications with Apache Cordova. software. In addition, Intel offers a portfolio of tools to help IoT developers go from rapid prototyping to production. Intel XDK for Mac is a great set of tools that provides you with a simplified development environment for both native and mobile web development, in order to create cross platform mobile apps. It is a full featured IDE for building hybrid mobile applications, and includes templates, a WYSIWYG design editor, Brackets-based code editor, and an.
- Intel Xdk For Mac Os
- Intel Xdk For Mac Windows 10
- Intel Xdk For Mac Installer
- Intel Xdk For Mac Windows 7
This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.
Introduction
The Intel Development Kit for IoT (IoTDK) is a complete solution to create and test applications for Intel IoT platforms like the Intel® Galileo and Edison maker boards.
The complete IoTDK provides software and hardware component for developers to create innovative projects using the Galileo board and the Grove Starter Kit for starter. The software distributed with IoTDK comprises of three main parts: the Intel® XDK IoT Edition, the Yocto Linux* system, and a set of libraries. These libraries were created to provide developers an easy way to control the hardware components integrated with Intel IoT platforms, as well as providing high level access to several sensors and actuators.
The Yocto Linux is a meta distribution specifically for embedded projects. It is a meta distribution because it is more than a Linux distribution - Yocto is an environment for producing tailored Linux-based operating systems. Yocto provides tools for selecting software packages, preparing settings and creating images that can be used to install this tailored OS. When you buy a Intel Galileo board, Yocto is the operating system available. With the IoTDK, another version is included, with even more libraries and resources, to offer developers more resources for creating applications in their favorite programming language. This version includes GCC*, Python, Node.js, OpenCV, just to name a few. If you would like to know more about Yocto, visit www.yoctoproject.org.
The Intel® XDK IoT Edition distributed with IoTDK lets you create and run applications directly on Intel IoT platforms. This edition of Intel® XDK also provides templates for creating new applications, and we shall see how to use them later. Intel® XDK IoT Edition offers the possibility of remotely debugging your application, and running it from your own desktop. Since Intel Galileo is intended to run IoT projects, its processing power is somewhat limited, so bigger or more complex projects can take advantage of a more powerful processor to run a complete developer environment. Developers do not need to use the Intel® XDK IoT Edition, but it’s a great tool to have.
The Yocto system installed on the Intel Galileo or Edison board provides a set of libraries especially designed for the IoTDK and the Intel® XDK IoT Edition. These libraries are MRAA and UPM. MRAA is a low level library that offers a translation from the General Purpose Input/Output interfaces to the pins available on Intel Galileo or Edison. So instead of reading the raw level information from the GPIO module available on the Linux kernel, a developer can easily select a pin number and work directly with it. MRAA will take care of the underlying details. UPM is a repository of sensors representations, written in C++, and utilizing MRAA to do so. Both of these libraries have C++ bindings to JavaScript. With Intel® XDK IoT Edition, Node.JS is used to communicate with all of the GPIO Pins, libraries, and packages. For instance, the GPIO Pin 13 can be assigned with a useful line of code like var onboardLED = new mraa.Gpio(13);
Requirements
- Intel Galileo (1st or 2nd Generation) Or Intel Edison
- If Intel Galileo 1st Generation or Gen1: B9 Female to 3.5mm Serial Cable (see https://communities.intel.com/thread/46560 for information on where to buy it or https://communities.intel.com/message/208514#208514 on how to build it)
- For Intel Galileo 2nd Generation or Gen2: USB to 6-pin FTDI serial cable
- For Intel Edison: USB Type A to Micro-B USB cable
- Desktop Operating System: Windows® 7 64-bits, Apple® OS X, Ubuntu®
Components
The following highlights important hardware components of the IoTDK.

- Intel® Galileo board or Intel® Edison
- MicroSD Card
- USB to Serial Cable
- Serial to D9 Cable
- Ethernet Cable
- Grove Starter Kit Plus
- A Modular Electronics platform for engineers and artists to turn their ideas into reality.
- It includes basic shield, sensors, button, relay, servo, LCD, LEDs and connecting cables.
Setting Up the Intel® Galileo Board
If using a Intel Galileo board, our first step is to update onboard firmware.
- Download the Arduino* software for Galileo at https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23171
- Connect the Intel Galileo board from the USB host port to the desktop system’s USB port
- Launch the Arduino Software
- Navigate to Tools > Board > Intel® Galileo Board or Intel® Galileo Gen2
- Navigate to Tools > Serial Port > COM?
- Note: (Windows) You can find this under the Windows Device Manager
- Note: (Apple OS X*) You can find this under the Apple Logo > About This Mac > System Report
- Note: (Ubuntu*) You can find this using the lsusb command in the Terminal
- Navigate to Help > Firmware Update
Our second step is to prepare the Intel Galileo board to be used with our IoTDK. As mention previously, this means starting the board with the prepared Yocto image.
Download the latest image from https://software.intel.com/sites/landingpage/iotdk/board-boot-image.html
Windows*

- Using 7zip or a similar tool, extract the downloaded image file *.bz2 on your Windows system.
- Insert the micro-SD Card in the appropriate card slot of the Windows system.
- Download the Win32DiskImager utility and install it as an Administrator. After a successful installation, run the Win32DiskImager as an Administrator.
- Ensure that you have selected the correct Device Drive corresponding to your inserted micro-SD card for writing.
OS X* or Linux*
- In OS X Command line (Terminal application), you can write the image to the SD card.
- Type the following commands (Example)
- diskutil list
- identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)
- diskutil unmountDisk /dev/
- e.g. diskutil unmountDisk /dev/disk4
- sudo 3dbs=1m if=.img of=/dev/
- e.g. sudo 3dbs=1m if=iot-devkit-mmcblkp0.direct of=/dev/rdisk4
- (This will take a few minutes)
Connecting the Galileo Board to your desktop
- Place the prepared micro-SD card in the micro-SD card slot on the Intel IoT platform
- If using an Intel Galileo board, connect the correspondent serial cable (B9 for Gen1, FTDI for Gen2) in the appropriate port on the board. Connect the other side to an USB port on the desktop system.
- Connect the Ethernet cable to the Intel Galileo board, and the other point to your LAN, such as your router
- Connect the power cable on the Intel Galileo board, and connect it to the electrical power to start it up.
- Important note: make sure you have a power cable appropriate to your board. The power cable from Intel Galileo Gen2 is similar to Gen1, however it provides 12V instead of 5V, and the Gen1 is not prepared for it which can damage your board.
The full setup should look like this:
Discovering the Board’s IP Address
Windows
- Using a terminal emulator (for example, Putty), open a Serial connection with the board:
- First, find which serial port your Windows system recognized as connected to the board. Open Start -> Devices and Printers, and you should see an USB-Serial entry.
- Open your terminal emulator(Putty), and set the following configurations:
- Session
- Serial line: COM?
- For example, COM12
- Speed: 115200
- Connection type: Serial
- Serial line: COM?
- Session
- Window
- Serial
- Serial line to connect to: COM?
- Speed (baud) :115200
- Data bits: 8
- Stop bits: 1
- Parity: 1
- Flow control: XON/XOFF
- Serial
- Open the connection. If you don’t see anything, hit enter on your keyboard.
- Login with the root superuser. The password is empty. Type root
- Using the command `ip a`, identify the IP address being used by the board. It should be listed as inet, inside the second listed entry.
OS X

Using the Bonjour Browser, view all of the Bonjour services on your local network:
- Launch the Bonjour Browser application
- Search for _xdk-app-daemon._tcp.
- Expand it to discover the IP address
Setting up the Intel® Edison Board
- Windows* Getting Started instructions - https://communities.intel.com/docs/DOC-23147
- Mac OS X* Getting Started instructions - https://communities.intel.com/docs/DOC-23148
- Linux* Getting Started instructions - https://communities.intel.com/docs/DOC-23149
Higlights
- NDG Edison image (Rel-1-Maint-WW42+)
- The latest NDG Edison Image (Rel-1-Maint-WW42, https://communities.intel.com/docs/DOC-23242) comes preinstalled with XDK daemon 0.0.19
The daemon 0.0.19 fixes a stability bug with remote debugging, and also adds mandatory IP address whitelisting.
In order to connect to an Edison running the XDK daemon, the user must now first run the following command from the Linux* terminal of the Edison.
xdk-whitelist --add <ip address> (where <ip address> should be the address of the computer running the Intel® XDK IoT Edition)
If a user attempts to connect to the Edison from an unauthorized (aka not in the white list) host, an error message with instructions on how to add the computers IP address to the whitelist will be presented.
The xdk-whitelist utility accepts the following commands:
- --clear Remove all IP addersses from the whitelist
- --add Add an IP address to the whitelist. [ Example: xdk-whitelist --add <ip address> ]
- --remove Remove an IP address from the whitelist. [ Example: xdk-whitelist --remove <ip address> ]
- --list Display a list of IP addresses in the whitelist
Notes
If you are experiencing issues connecting to your Intel Edison board or even your Intel Galileo board to Intel XDK IoT Edition, run the following commands in a ssh session:
- systemctl enable xdk-daemon
- systemctl restart xdk-daemon
If you don’t see your board automatically within the IoT Device dropdown menu, click Add Manual Connection:
- Type the IP Address for your board in the Address: field
- Type 58888 for your board in the Port: field (By default, Intel XDK app daemon port is 58888)
If you continue to have network connection related issues with your board or Intel XDK:
- For Edison, reboot the board within the ssh terminal or manually power cycle the board
- For Intel XDK, Close application and reopen
Setting up the Intel® XDK
- Download Intel® XDK IoT Edition to your computer at http://software.intel.com/en-us/html5/xdk-iot
- Double click the on the file iot_web_<desiredOS>_master_<versionNumber> to install and launch Intel® XDK IoT Edition for application development.
- This will open Intel® XDK with the various project creation options including the Work from an IoT with Node.js Template option.
- Select the Start with a Sample or Template under the Internet of Things (IoT) with Node.js Projects option to open the environment for developing Node.js applications for your board. The end results should look like this:
Note: A toolbar appears at the bottom of the Develop tab when editing a Internet of Things (IoT) with Node.js Projects project. This includes a list of accessible & connected boards running the IoTdevkit Linux* image on the left and a button on the right that hides or show the command console. The toolbar also includes the functionality to install/build node modules, upload, debug, stop and run the active project
- Let’s connect to the Intel Galileo board. Click on the IoT Device drop down list, on the bottom left corner on Intel XDK.
- Select Intel Galileo (quark) in the list.
- A popup window appears displaying the Connection status and IP Address of the Intel Galileo or Edison board.
Running a Sample Application
As you may have noticed, Intel® XDK IoT Edition has some examples projects already built in. Execute a simple one to test if everything is properly connected.

- In the Projects tab, under Internet of Things (IoT) with Node.js Projects, click Start with a Sample or Template.
- Choose a project type
- Click Use This Template
- Input a Name and create the project. This becomes the active project in the Intel XDK.
- Click the IoT Device: Dropdown menu in the bottom toolbar to connect to your board
- Click the Toggle console window button to reveal the console window
- Click Manage your daemon/IoT device menu in bottom toolbar. Select sync PC time w/ clock on target board to avoid computer and device timing issues. (#1 in the image above)
- Click Install/Build to fetch node modules specified in package.json and install them on device. (#2 in the image above)
- Click Upload to upload the current project to the board. (#3 in the image above)
- Click Run to run project on the device. (#4 in the image above)
Note: If you get an error message saying 'can not find mraa', connect to your board using a ssh session and run the following:
- echo 'src maa-upm http://iotdk.intel.com/repos/1.1/intelgalactic' > /etc/opkg/intel-iotdk.conf
- opkg update
- opkg upgrade
Related Links and Resources
- MRAA Github Repository: https://github.com/intel-iot-devkit/mraa
Intel XDK
- Intel XDK IoT Edition: http://software.intel.com/en-us/html5/xdk-iot
- Intel® XDK IoT Edition node.js Templates Article: https://software.intel.com/en-us/html5/articles/intel-xdk-iot-edition-nodejs-templates
- Intel XDK IoT Edition Forum: https://software.intel.com/en-us/forums/intel-xdk
Intel Developer Zone (IDZ) – Internet of Things (IoT) Zone
- Installation for JavaScript (Intel® XDK IoT Edition) Intel Galileo & Edison - https://software.intel.com/en-us/installation-for-javascript-intel-xdk-galileo-and-edison
- Intel® Developer Zone – IoT: https://software.intel.com/iot
- Intel® IoT Developer Kit: https://software.intel.com/en-us/iot/devkit
- Intel® IoT Developer Kit Sensors: https://software.intel.com/en-us/iot/sensors
- Intel Developer Zone – IoT Downloads: https://software.intel.com/en-us/iot/downloads
- Intel® IoT Developer Kit Linux* Image: https://software.intel.com/sites/landingpage/iotdk/board-boot-image.html
Intel Edison
- Intel Edison Community: https://communities.intel.com/community/makers/edison
- Edison Software Downloads: https://communities.intel.com/docs/DOC-23242
A version of this article was originally published as part of the Intel® XDK documentation book.
This document assumes that you have successfully exported your Intel XDK project using the Cordova Build Package export tool. For instructions on to export your project, see the doc page titled Export your Intel® XDK Mobile App to PhoneGap* Build or Cordova* CLI.
Intel Xdk For Mac Os
Requirements to Build with Cordova CLI 6.x
Building your app locally (on your development system) with Cordova CLI 6.x requires installation of Node.js, Cordova CLI and the appropriate vendor-specific development tools for the targets of interest (i.e, Android Studio* for Android, Apple* Xcode* for iOS and Microsoft* Visual Studio* for Windows).
IMPORTANT: Building for iOS requires macOS and Xcode; building for Windows requires Microsoft Windows 8.1+ and Visual Studio; building for Android is supported on Windows, OS X and Linux.
Details regarding the necessary tools, versions and system requirements can be found on the following pages of the Cordova CLI 6.x documentation:
Installing Node.js and Cordova CLI 6.x
You must install the appropriate native development tools before you can use Cordova CLI on your development system! The instructions that follow do not explain how to install those native tools. It is best to install them first before installing Cordova CLI. See the links above for details and pointers to install those native development tools.
The instructions in the Create your first Cordova app documentation page provide a detailed discussion about how to create, build and test apps using Cordova CLI 6.x. The following sections will guide you through a typical installation. In the following, we will install the latest version of Node 6.x and Cordova CLI 6.5.0.
Installing Node.js
If you need to manage multiple versions of Node.js on your development system, install Node Version Managerfirst and then use it to install Node.js. This will allow you to easily install and switch between multiple versions of Node.js. Windows users can use Node Version Manager for Windows to install and manage multiple versions of Node.js.
Assuming you are NOT using Node Version Manager, use the following instructions to install Node.js on your system.
Installing Node.js on Windows or Mac
For Windows or Mac, go to the Node 6.x latest distribution folder and download the Windows MSI installer or the macOS PKG installer. For example, at the time this article was written, the latest version of Node 6.x was 6.11.2. So the following installers were available to downloaded in the Node 6.11.2 distribution folder:
- node-v6.11.2-x86.msi < for installation on Windows (32-bit or 64-bit)
- node-v6.11.2.pkg < for installation on Mac OSX
Each of the above is a 'runnable executable' for the respective platform. You can 'double-click' the appropriate installer file that you have downloaded and it will install and configure Node.js 6.x for your system.
Installing Node.js on Debian or Ubuntu
To install the latest version of Node 6.x on a recent Debian or Ubuntu system, use the following command-line:
For help with installing Node.js on other Linux systems, see this useful GitHub repo > https://github.com/nodesource/distributions.
Testing your Node.js Installation
To test your installation of Node.js on any OS, type the following at a command-line:
If you see a result similar to the above, you have successfully installed Node.js 6.x.

Installing Cordova CLI 6.x
To manage multiple versions of Cordova CLI install Version Manager for Cordova Softwarebefore installing Cordova CLI. You can use then use 'cvm' to to install and switch between multiple versions of Cordova CLI.
If you are not using Version Manager for Cordova, follow these instructions to install Cordova CLI 6.5.0 on your development system.
This will force the installation of Cordova CLI 6.5.0.
Intel Xdk For Mac Windows 10
IMPORTANT: If you want to match the CLI 6.2.0 option that was in the retired Intel XDK build settings, specify 'cordova@6.2.0' instead of 'cordova@6.5.0' in the above command line.
To test your installation of Cordova CLI, type the following at the command-line:
If you see a result identical to the above, you have successfully installed Cordova CLI 6.5.0.
IMPORTANT: Versions of Cordova CLI prior to 6.x do not reliably add all the plugins listed in the config.xml file and Cordova CLI 7.x adds new requirements to project and plugin configuration files that may not be compatible with the config.xml file exported by the Intel XDK.
For best results building your Intel XDK mobile app with Cordova CLI we recommend that you install Cordova CLI 6.2.0 or 6.5.0.
Version 6.2.0 of Cordova CLI will give the same build results as that used by the retired Intel XDK build system, if you had selected the CLI 6.2.0 option in the Build Settings section of the Projects tab. For additional help with CLI versions, see this Intel XDK FAQ.
You can install CLI 6.2.0 using the following npm command:$ npm -g install cordova@6.2.0
Test Your Node and Cordova CLI Installation
You can use this simple command-line test to confirm that your Cordova CLI build environment is ready to use:
This test assumes you are building for Android and using Cordova CLI 6.x.
If the test above failed at the 'prepare' or the 'build' step, try running the following command to get information on what might be missing:
The results shown above are for a working Android SDK and tools installation. When 'cordova requirements' fails, it will look something like this:
In that case, see this forum thread, especially the details in this forum post located within that thread, for help resolving your Android SDK setup.
If you are building for iOS or Windows simply replace android with ios or windows in the lines above. Note that because Cordova CLI runs on Node.js, the commands you type are identical, regardless of your development machine’s operating system (OS).
Type cordovahelp for additional commands and see the cordova-cli GitHub* repo for a complete list of the Cordova CLI commands that are available.
Build the ZIP Project with Cordova CLI
Once all the necessary Cordova CLI build tools are in place you can build your app directly at the command line. See the Cordova documentation for complete details.
In essence, you will do the following to build a mobile app package with the contents of the exported ZIP project, using Cordova CLI:
- Unzip the ZIP file you exported with the Create Cordova Package tile.
- Perform a
cordovaplatformadd<platform-name>for each target platform. - Perform a
cordovabuild<platform-name>for each target platform.
When you are ready to build a package to be submitted to an app store, you will need to add your signing certificates to the Cordova CLI project, so you can build a signed app. Otherwise, you can use the default signing certificate provided by Cordova CLI to build a debuggable version of your app.
The Cordova CLI documentation provides instructions regarding how to:
If you encounter issues when building for iOS, especially an 'error 65' message, you are probably experiencing app signing issues. This StackOverflow post may be of value. Likewise, employing this hook.js file by Darryl Pogue may be helpful. Finally, this guide to signing iOS apps may be of interest to the very curious.
The --debug and --release and--device Cordova CLI options are not well documented, but are essential for creating a 'debug' or 'release' iOS build and for directing Cordova to build an IPA package rather than a simulator image for use with the Xcode iOS simulator. See this forum post for help configuring and signing your iOS project for a successful build with the Cordova CLI tools.
See the cordova-cli GitHub* repo for a complete list of the Cordova CLI commands that are available.
See this forum post for help configuring and signing your iOS project for a successful build with the Cordova CLI tools.
Transferring Signing Certificates to Cordova CLI
iOS Signing Certificates:
You do not need to transfer your iOS signing certificates or mobile provisioning files from the Intel XDK to PhoneGap Build!!
It is much simpler to create a new set of iOS signing certificates, using the iOS signing instructions provided by PhoneGap Build, than it is to transfer existing iOS developer certificates stored in the Intel XDK build system to your Cordova CLI project.
If you have trouble creating your iOS signing certificates on a Mac (using the Mac instructions), use the Windows iOS signing certificate instructions, instead. The instructions to create an iOS signing certificate on a Windows PC will work on all platforms (Windows, Mac and Linux).
Windows Signing Certificates:
Likewise, it also simpler to create a new Windows signing certificate for use with PhoneGap Build using your Microsoft Developer Account. The process is explained in the PhoneGap Build signing instructions for Windows.
Android Signing Certificates:
IMPORTANT: if you have never published an APK to an Android store you can skip this section and create a new signing certificate by following the PhoneGap Build signing instructions for Android.
If, and only if, you have published an APK to an Android store, using the Intel XDK, you should continue to use the same Android signing certificate to publish updates to your app. This means you may want to use your Intel XDK developer certificate to build and sign your APK when performing a release build with Cordova CLI (if you are only debugging your app you can use the default signing certificate that Cordova CLI automatically provides).
Find the developer certificate you have been using to sign your published apps, in the Intel XDK Certificate Management tool. From there download the certificate and use it to sign your Android app that you are building with Cordova CLI (the precise name of the certificate's alias will probably be different than what is shown in the image below):
Intel Xdk For Mac Installer
If the signing certificate you used to publish your APK is not in the Intel XDK Certificate Management tool, we cannot help you retrieve it, the only certificates stored by the Intel XDK build system are those that you can download directly from the Certificate Management tool, under the Account Settings icon, as shown above.
If you have never converted your Android 'legacy' certificate you must first do so before you can download it using the Certificate Management tool; see this video for help with that process. If you are not seeing all the fields in the certificate management dialogs, please see this forum post for help.
When it comes time to build your Android app, with the signing certificate you retrieved from the Intel XDK, you will need both a certificate password and a keystore password. Any keystore file you created with the Intel XDK and downloaded from the Certificate Management tool contains a single certificate. When you created that keystore using the Intel XDK, if you chose to use a single password for both the certificate and the keystore, use that one password to unlock your signing certificate; otherwise, you must provide both passwords.
IMPORTANT: It is very important that you keep a copy of your keystore in a safe place and remember the password(s). Once deleted or lost, we cannot help you retrieve that information!!
Building with Crosswalk
IMPORTANT: The Crosswalk project was retired in February, 2017. We recommend you change your Build Settings to build for Android 4.4 (minimum API level 19) and later and discontinue using Crosswalk unless your application truly requires it. Cordova applications that run on Android versions 5 and above will see little or no benefit from using Crosswalk, unless you are using APIs that are unique to the Crosswalk runtime. If you have been using Crosswalk and choose to stop using it, you may experience some issues with the Android 'versionCode' number; see this article for help with Android versionCode issues.
If your project is configured to build for Crosswalk on Android, the exported config.xml file includes a preference tag that directs Cordova CLI to create a 'multi-architecture' APK file. This is different than the cloud-based Intel XDK build system, which created two 'single-architecture' APK files that were delivered in a single ZIP file. This behavior is caused by the following tag:
A “multi-architecture” Crosswalk APK file contains 32-bit Crosswalk libraries for both x86 and ARM mobile devices in a single APK file. The xwalkMultipleApk tag is necessary because PhoneGap Build returns only a single APK file when it performs a Crosswalk build, unlike the retired Intel XDK build system, which returned a ZIP file that contained two APK files, one for x86 and one for ARM.
If you unzip a multi-architecture APK you can see both Crosswalk libraries included in the package.
Since you are using Cordova CLI to build your app, and not PhoneGap Build, you can, optionally, change the value of this preference tag. Removing the xwalkMultipleApk tag from the config.xml file (or changing the tag “value” to “true”) and building with Cordova CLI will result in generating two APK files, but they will not be bundled into a single ZIP file.
Unfortunately, it is not obvious, when you look at the Cordova CLI build messages, that two APK files were generated. The two Crosswalk APK files are located inside your Cordova CLI project:
See this forum post for a more detailed example.
[OPTIONAL] Integrating Cordova CLI with the Intel XDK
If you want to build your app using Cordova CLI, and continue to use the Intel XDK to edit and debug (e.g., using the Simulate tab) you can create a mirror Cordova CLI project that links back to the Intel XDK project sources. The mirror CLI project contains links to the www and package-assets folders located in your Intel XDK project.
IMPORTANT: the technique described below assumes you are familiar with the use and concept of filesystem “links” and that you are comfortable using OS command-line tools (ln on macOS and Linux and mklink on Windows). If this is not the case you should not use this technique!!
For example, assume you have an Intel XDK project (the master project) named my-project and your mirror CLI project is (the slave project) named my-project-cli.
Here are the contents of the master Intel XDK project folder, named my-project:
And here are the contents of the new slave Cordova CLI project folder, named my-project-cli (before any Cordova commands have been executed):
The small arrows on the www and package-assets folders in the slave folder image indicate a symbolic link that points back to the same-named folders in the master project folder (these images are from macOS, other operating systems may display links differently). If we look at the command-line we see something like this (again shown on an macOS machine, other systems will display differently):
The following steps were taken to get to this state:
- Create a mirror CLI folder (in this example:
my-project-cli). - Generate a
config.xmlfile using the Create Cordova Package tool or thexdk-to-cliscript. - Copy the
config.xmlfile into the mirror CLI folder (e.g.,my-project-cli). - Create links to the
wwwandpackage-assetsfolders in the master project folder (e.g.,my-project). - If there are other important folders you need in the mirror project, create similar links to those folders. This is not likely, since Cordova CLI and the Intel XDK only need to share the
wwwandpackage-assetsfolders.
Now perform the commands (assuming you will be building for Android):
Following the steps above, your my-project-cli folder should look something like this:
The platforms and plugins folders were created by the cordovaplatformadd… and cordovaprepare command(s) and contain the additional source and binaries files needed by Cordova CLI to perform a local build on your machine (assuming all of the necessary build tools have been installed onto your development machine).
Intel Xdk For Mac Windows 7
Now you can rebuild your app in your my-project-cli folder with Cordova CLI after making changes to your app using the Intel XDK (which is operating on the master files in the my-project folder).
IMPORTANT: if you change Build Settings or add/remove plugins using the Projects tab of the Intel XDK, you must generate a new config.xml file and update that file and plugins within your mirror project.
Keeping plugins in-sync, between the master project and the CLI slave project, can be challenging; especially if you are making frequent changes to the plugins in your project using the Intel XDK Plugin Management tool on the Projects tab. There is no single “right way” to do this. Below are a few suggestions of how to handle this task, in no particular order:
- Perform the same operation(s), by hand, in your mirror project, using the
cordovapluginadd…andcordovapluginremove…commands. - Use the
cordovapreparecommand to have CLI automatically add plugins per changes to theconfig.xmlfile — unfortunately, this procedure will not automatically remove plugins that have been removed from theconfig.xmlfile, those you will have to remove by hand using thecordovapluginremove…command. - Delete the
pluginsfolder in your slave CLI project and use thecordovapreparecommand to automatically add back the plugins found in the newconfig.xmlfile. - Delete the
pluginsand theplatformsfolders in your CLI slave project and perform acordovaplatformadd…operation, which will simultaneously add the plugins listed in the newconfig.xmlfile.
All of the above strategies have pros and cons, none is a perfect solution. What works best for you will only be determined through time and experience.
Using the ‘xdk-to-cli’ Node.js Script
If you are unable to successfully create a ZIP file using the Cordova Build Package tile, or you want more control over that process, you may need to use this xdk-to-cli Node.js script. Full instructions and requirements are provided in the script’s README file.