Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Filetransfer plugin dependency on File plugin

Hooman_F_1
Beginner
876 Views

I selected the File Transfer plugin in my project, but the build would fail.  I had to also check the File plugin for the build to succeed.  It would be nice if FileTransfer is chosen, that File is also selected in the project.

0 Kudos
6 Replies
PaulF_IntelCorp
Employee
876 Views

The file-transfer plugin is supposed to do that automatically, so there's likely an error in that version of the plugin. Those two plugins have experienced lots of changes, it's a good idea to use the latest version of them. You can find the versions if you go to the respective git repo or the Cordova registry. You can edit the version directly by clicking the pencil icon in the plugin settings page of the Projects tab.

0 Kudos
Gary_H_2
New Contributor I
876 Views

I'm trying to use the latest Cordova File (2.1.0) and FileTransfer (1.2.1) plugin but both fail to install during the build. Any clues as to why that would be? 

0 Kudos
PaulF_IntelCorp
Employee
876 Views

Due to recent changes made by the developers of the Apache Cordova project, saying "latest" doesn't always work with CLI 4.1.2. It's hard to explain, but they changed some naming conventions and are changing the plugin registry, which is causing problems with retrieving plugins. We are working on implementing support for CLI 5.x, which will help to resolve many of these issues.

The safest thing to do is to use versions of the File Transfer plugin that are less than 1.0 and versions of the File plugins that are less than 2.0. Those versions represent the change to CLI 5.x, which is likely causing the troubles you are encountering. Start with File Transfer version 0.5.0 and 1.3.3 for the File plugin.

0 Kudos
PaulF_IntelCorp
Employee
876 Views

p.s. Try the new Early Access edition to see how the management of your plugins works better. See the two top posts in this forum for more details: https://software.intel.com/en-us/forums/intel-xdk-early-access

0 Kudos
Gary_H_2
New Contributor I
876 Views

Thanks for the response Paul. By trial and error I had established that 1.3.3 was the latest that worked with the XDK but I've run into an issue with getFile and the external SD card (http://stackoverflow.com/questions/31554496/cordova-getfile-and-external-sd-card) so I wanted to try the latest latest version hoping it was fixed. 

0 Kudos
PaulF_IntelCorp
Employee
876 Views

There is a way to get the newer version of those plugins into your app. Download these ZIP files to your dev system:

If you are using 2248 (the current XDK release):

  • extract the ZIP files into your project "source directory" (usually the www directory)
  • use the "import local plugin" feature in the "third-party plugins" section of the Projects tab plugins to add these plugins to your project
  • uncheck the same plugins from the Projects tab (file and file-transfer) to avoid compatibility conflicts

If you are using the Early Access version:

  • extract the ZIP files to a convenient location on your dev system (outside your project directory)
  • use the "add plugins to this project" tool on the "plugin management" section of the Projects tab
  • select "third-party plugins" and click the "import local plugin" option
  • locate the plugin directory and "import" it
  • as above, do not "select" these plugins from the core Cordova plugins list, or you will have compatibility conflicts

In both cases these two "third party plugins" will be pushed to the cloud server with your source. In the first case your APK will increase in size by the size of the plugins, since they will be reproduced in the APK (due to the way the build server deals with the "old style" plugin management system).

These plugins have new plugin IDs. They use a different naming convention and that new file transfer plugin will reference the file plugin's new ID. So it is important that if you have any other plugins that depend on the file plugin, you also update those versions so they reference the new ID. Check the plugin.xml file of your other plugins to determine if this is the case (you'll have to locate their respective repos).

0 Kudos
Reply