Remote debugging: port forwarding from PC to iOS/iPhone
Asked Answered
M

1

6

I want to inspect a web app, running on localhost, loaded in phones via USB. I am able to inspect, and remotely control tabs of all connected phones in Chrome at chrome://inspect/#devices. However, Chrome's DevTools port forwarding feature only works for Android phones, so I am unable to load the localhost app in the connected iPhone.

Any ideas, how to set port forwarding to the iPhone?

These Q&A didn't work for me, but are related and might help others: Reverse Port Forwarding in iOS over USB, iPhone testing: port forwarding and localhost. Also searched on Ask Different, but all I got was Port forwarding on iPhone?, so I guess it is better to ask here on SO.

I have taken these steps (Synchronous live debugging of desktop and mobile site versions) to get it up and running, and found this great guide to enable Inspection/debugging on the iOS.

Microbiology answered 22/4, 2020 at 11:24 Comment(0)
Y
0

(This post is old ik but for Googlers) Though not as streamlined or secure as the Reverse Port Forwarding that the chrome://inspect tools give us for Android, I found ngrok is free and seems to work well enough to get a localhost server onto a remote Apple device (TL;DR it's a tunnel). Since it's not as secure, I'd recommend at least using their OAuth setup with restricted emails and only port forwarding for a short time when you need to, but I'm also not a networking engineer so I can't confidently comment on how secure it really is.

Yacov answered 18/10 at 3:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.