apache/cordova-ios — pull request #119 by tony-- (2014-11-21 18:18:13+00:00)
Title: 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]];
}
```