Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7991 WKWebView integration
  3. CB-8032

Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory:

    XMLWordPrintableJSON

Details

    Description

      Right now in CDVFileSystem->makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key "nativeURL" the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.)

      When calculating the nativeURL, allow this to be specified externally, check for a selector "nativeURL" and call that if available.

      This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m

      ... which when linked will have the selector available for the File plugin to call.
      This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver.

      For example if the FileEntry is to:

      file://my/package/folder/Documents/foo.txt

      .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080:

      http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt

      Attachments

        Activity

          People

            shazron Shazron Abdullah
            shazron Shazron Abdullah
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: