- With the simulator launched, lookup the simulator socket
- Look for a name that ends in
com.apple.webinspectord_sim.socket
, copy that.
- Spawn
ios_webkit_debug_proxy
passing in that socket prefixed with unix:
ios_webkit_debug_proxy -s unix:<socket from step 2>
- It should output something like the below
$ios_webkit_debug_proxy -s unix:/private/tmp/com.apple.launchd.y7tX5zeZ81/com.apple.webinspectord_sim.socket
Listing devices on :9221
Connected :9222 to SIMULATOR (SIMULATOR)
- Connect to
http://localhost:9221/json
in the browser
- You should see your simulator/devices listed
- Open the application on your simulator
- Take the
url
property from SIMULATOR
entry on http://localhost:9221/json
and open <url>/json
in your browser
- You should see some output like below
{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/2",
"faviconUrl": "",
"thumbnailUrl": "/thumb/",
"title": "JSContext",
"url": "",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/2",
"appId": "PID:76060"
}
So when I try to list the simulators using http://localhost:9221/json, it doesn't seem to return something valid...???
I am getting:
[{
"deviceId": "SIMULATOR",
"deviceName": "SIMULATOR",
"deviceOSVersion": "0.0.0",
"url": "localhost:9222"
}]
Should the deviceOSVersion be correct? Also, when you say 'Start the app', I am expecting that when I debug it should be installing to the sim, but doesn't get installed. And the sim seems to freeze. ie. stuck on the main screen and can't swipe to other screens.