cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tony-- <...@git.apache.org>
Subject [GitHub] cordova-ios pull request: partial proof of concept for proposal di...
Date Fri, 21 Nov 2014 18:18:15 GMT
GitHub user tony-- opened a pull request:

    https://github.com/apache/cordova-ios/pull/119

    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/",
self.server.port]];
    }
    ```
    


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

    $ git pull https://github.com/tony--/cordova-ios wkwebview

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

    https://github.com/apache/cordova-ios/pull/119.patch

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 <tony.homer@intel.com>
Date:   2014-11-21T18:08:10Z

    partial proof of concept for proposal discussed in https://issues.apache.org/jira/browse/CB-8032

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message