Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
#150 Conflict between apps
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Oct 9, 2015
1 parent e839fb9 commit 8f363c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ $ cordova prepare
No need for anything else - you can now open the project in XCode 6 if you like.

## 4. Changelog
* __0.6.3__ By default the embedded webserver uses port `12344`, but if you want to you can now override that port by setting f.i. `<preference name="WKWebViewPluginEmbeddedServerPort" value="20000" />` in `config.xml`.
* __0.6.2__ LocalStorage is copied from UIWebView to WKWebView again (iOS location was recently changed as it appears).
* __0.6.1__ Allow reading files from /tmp, so the camera plugin file URI's work. Thx #155.
* __0.6.0__ iOS9 (GM) compatibility. Also, compatibility with iOS8 devices when building with XCode 7 (iOS9 SDK). Dialogs (alert, prompt, confirm) were broken.
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="com.telerik.plugins.wkwebview"
version="0.6.2">
version="0.6.3">

<name>WKWebView Polyfill</name>

Expand Down
9 changes: 7 additions & 2 deletions src/ios/AppDelegate+WKWebViewPolyfill.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,15 @@ - (void)startServer
[_webServerOptions setObject:[NSNumber numberWithBool:YES]
forKey:GCDWebServerOption_BindToLocalhost];

// Initialize Server listening port, initially trying 12344 for backwards compatibility
// If a fixed port is passed in, use that one, otherwise use 12344.
// If the port is taken though, look for a free port by adding 1 to the port until we find one.
int httpPort = 12344;

// note that the settings can be in any casing, but they are stored in lowercase
if ([self.viewController.settings objectForKey:@"wkwebviewpluginembeddedserverport"]) {
httpPort = [[self.viewController.settings objectForKey:@"wkwebviewpluginembeddedserverport"] intValue];
}

// Start Server
do {
[_webServerOptions setObject:[NSNumber numberWithInteger:httpPort++]
forKey:GCDWebServerOption_Port];
Expand Down

0 comments on commit 8f363c9

Please sign in to comment.