cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory:
Date Fri, 21 Nov 2014 18:18:33 GMT


ASF GitHub Bot commented on CB-8032:

GitHub user tony-- opened a pull request:

    partial proof of concept for proposal discussed in CB-8032

    This PR is meant to demonstrate the proposal I made in a comment on CB-8032.
    As such, I did not test it - it is only meant for discussion.
    This adds a plugin result delegate that can munge the plugin result js before it is returned
to the user's application.
    The Cordova Local Web Server plugin would set itself as the delegate:
    self.viewController.commandDelegate.pluginResultDelegate = self;
    and implement the mungePluginResult method something like the following:
    -(NSString *)mungePluginResult:(NSString *)result {
    	return [result stringByReplacingOccurrencesOfString:@"file://" withString:[NSString stringWithFormat:@"http://localhost:%lu/",

You can merge this pull request into a Git repository by running:

    $ git pull wkwebview

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #119
commit 91827d884fa5065309b8c18dd7f9deebc6b32c80
Author: Tony Homer <>
Date:   2014-11-21T18:08:10Z

    partial proof of concept for proposal discussed in


> Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory:
> --------------------------------------------------------------------------------------
>                 Key: CB-8032
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer,
Plugin Media, Plugin Media Capture
>         Environment: iOS
>            Reporter: Shazron Abdullah
> 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:
> ... 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

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message