Skip to content
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

Support detecting simulator #160

Closed

Conversation

ewanharris
Copy link
Contributor

@ewanharris ewanharris commented Jun 26, 2019

google/ios-webkit-debug-proxy#306 introduced passing the simulator web inspector socket in to ios_webkit_debug_proxy. The socket can be looked up using lsof -aUc launchd_sim and finding the matching socket based off the provided UDID, I went this route (as opposed to a user providing the socket) as I figured it would be easier to find the UDID.

This is still pretty rough (exception handling could be improved), but I wanted to push a PR early to see whether this would be a welcome addition

This also requires [email protected]

ios-webkit-debug-proxy supports passing a unix socket as the -s command flag, by allowing people to pass a simulator udid we can lookup this socket in lsof and then pass that into iwdb
debug(`iOSAdapter.getSimulatorUnixSocket`);
return new Promise(async (resolve, reject) => {
try {
const { stdout } = await exec('lsof -aUc launchd_sim');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also work on Windows?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dah, no Emulator on Windows, maybe bail if not MacOS?

@auchenberg
Copy link
Member

Few nits, otherwise LGTM!

@auchenberg
Copy link
Member

This project is now super-seeded by https://inspect.dev/ – a new developer tool for macOS and Windows to inspect and debug your web apps and websites in Safari and WebViews on iOS devices.

RemoteDebug iOS WebKit Adapter is not proactively maintained or extended.

@auchenberg auchenberg closed this Mar 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants