swifter
swifter copied to clipboard
ios http server cannot be visited by ip via local area network
I use this lib to start a server on iPhone, it works well on iPhone 7 plus
do {
server["/hello"] = { .ok(.htmlBody("You asked for \($0)")) }
try server.start(8080)
} catch {
NSLog("Server start error: \(error)")
}
But on other phones(such as XSMax Pro OS:13.3.1), I met confused problem, I can visit 127.0.0.1:8080/hello, it works well via iPhone Safari,
But when I use ip such as 192.168.0.41:8080/hello, it cannot work. Could you let me know why? Any help will be appreciated!
Same.
Same.