Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11539

ReferenceError: Can't find variable: FileTransfer

    XMLWordPrintableJSON

Details

    Description

      I have the following plugins installed
      com.googlemaps.ios 1.13.0 "Google Map iOS SDK for Cordova"
      cordova-plugin-camera 2.2.0 "Camera"
      cordova-plugin-compat 1.0.0 "Compat"
      cordova-plugin-device 1.1.2 "Device"
      cordova-plugin-dialogs 1.2.1 "Notification"
      cordova-plugin-email-composer 0.8.3 "EmailComposer"
      cordova-plugin-file 4.2.0 "File"
      cordova-plugin-file-transfer 1.5.1 "File Transfer"
      cordova-plugin-geolocation 2.2.0 "Geolocation"
      cordova-plugin-inappbrowser 1.4.0 "InAppBrowser"
      cordova-plugin-insomnia 4.2.0 "Insomnia (prevent screen sleep)"
      cordova-plugin-network-information 1.2.1 "Network Information"
      cordova-plugin-splashscreen 3.2.2 "Splashscreen"
      cordova-plugin-whitelist 1.2.2 "Whitelist"

      App is falling over on
      var ft = new FileTransfer();
      Error = ReferenceError: Can't find variable: FileTransfer

      Also fails on: console.log(FileTransfer);

      window.resolveLocalFileSystemURI(filePathAndName, function(fileEntry) {
      ... is working OK.

      XCode is reporting this warning during build:
      /Plugins/cordova-plugin-file-transfer/CDVFileTransfer.m:224:34: Values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead
      Otherwise the build is clean.

      I tried removing & re-adding the file-transfer plugin many times.
      On installing the plugin I always get this error .. (but I doubt this is causing my reference error issue)
      Installing "cordova-plugin-compat" for www
      Failed to install 'cordova-plugin-compat':AssertionError: path must be a string
      at Module.require (module.js:362:3)

      Attachments

        Activity

          People

            Unassigned Unassigned
            roger@fairport.com.au Roger Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: