SCNetworkReachabilityGetFlags returns 0 even when wireless available

后端 未结 4 1677
花落未央
花落未央 2020-12-17 03:21

I have an app that uses Apples reachability code. When I tab out of the app, turn on airplane mode, go back into the app, I correctly get a message that says no connection i

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-17 03:56

    I have found that this is caused by supplying a hostname with a protocol specifier (such as http://hostname instead of just hostname). Try specifying just the hostname by itself to see if this fixes your problem.

提交回复
热议问题