Open yiplee opened 9 years ago
How are you running ponyd
? If you want it to listen to connections outside of your computer, make sure you run ponyd
with -i 0.0.0.0
@wlue Thanks for your reply . I have tried -i 0.0.0.0
but failed with response code 403 when conecting .
Did you ever resolve the issue @yiplee ?
Hi, guys! Did you solve this issue? @yiplee @JonathanBouaziz? I've faced with the same problem. I've solved it in this way. Instead of [debugger connectToURL:[NSURL URLWithString:@"ws://localhost:9000/device"]]; Put your real IP-address. Smth like:
PDDebugger *debugger = [PDDebugger defaultInstance]; [debugger connectToURL:[NSURL URLWithString:@"ws://10.0.2.120:9000/device"]];
@Nadzeya-Zomato what do you mean by "your real IP-address?" Might be a noob thing to ask, but would this be the IP address for local-host? I'm not too versed in web/server things
@gruhls508 as the subject says it's all about app running on real device. So if you use localhost
as the address in connectToURL
, then your app will try to find the PD server (ponyd
) on the iPhone. That's why you have to specify address of your Mac, where ponyd
is running.
So:
ponyd serve -i 0.0.0.0
)connectToURL
(⌥+click on Wi-Fi icon to get your Mac's IP address)Ok that makes sense. Thanks @dstd
here is the code
here is the log
BTW , it works well on a simulator .