Skip to content

Commit

Permalink
Fixed connection to WDA with capabilities and desiredCapabalities. Fi…
Browse files Browse the repository at this point in the history
…xed device disconnection that was launching 3D Lab.
  • Loading branch information
JonGabilondoAngulo committed Apr 2, 2020
1 parent d111558 commit c66c2f6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main-process/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const path = require('path')
const config = require(path.join(__dirname, '../../package.json'))
const OrganismoWindow = require('./org-window')

app.setName(config.productName)
app.name = config.productName
var mainWindow = null
app.on('ready', function () {
mainWindow = new OrganismoWindow(app)
Expand Down
8 changes: 2 additions & 6 deletions src/organismo/ORGDeviceWDAController.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ class ORGDeviceWDAController extends ORGDeviceBaseController {
reject(this.xhr.statusText);
}
}
if (this.xhr.status === 200) {

} else {
reject(this.xhr.statusText);
}
}
this.xhr.onerror = () => {
reject(this.xhr.statusText);
Expand All @@ -80,7 +75,8 @@ class ORGDeviceWDAController extends ORGDeviceBaseController {
reject(new ORGError(ORGERR.ERR_CONNECTION_NOT_FOUND, "No connection found at given IP & PORT."));
}
}
this.xhr.send(JSON.stringify({desiredCapabilities:{bundleId:'com.apple.mobilephone'}}));
this.xhr.send(JSON.stringify({desiredCapabilities:{bundleId:'com.apple.mobilephone'}, capabilities:{bundleId:'com.apple.mobilephone'}
})); // Start with a simple desired capabilities. Send both keys for backwards compatibility.
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/organismo/ORGFluxStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class ORGFluxStore extends FluxUtils.Store {
bootbox.alert("Error connecting to idevicecontrolproxy.\nMake sure the proxy is running.\nRead about it @ https://github.com/JonGabilondoAngulo/idevicecontrolproxy");
}
}
}
} break;

//************************************************************
// LAB
Expand Down
2 changes: 1 addition & 1 deletion src/organismo/ORGUIJSONWDATreeAdaptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ORGUIJSONWDATreeAdaptor {
if (this.ignoreNodeKey(key)) {
continue;
}
if (key == "rect") {
if (key == "rect" || key == "visibleRect") {
description += "<b>" + key + "</b>:&nbsp" + JSON.stringify(node.rect) + "<br>";
} else {
description += "<b>" + key + "</b>:&nbsp" + node[key] + "<br>";
Expand Down

0 comments on commit c66c2f6

Please sign in to comment.