用 dio 请求后端接口
在模拟器一切正常,到真机提示如下:
DioExceptionType.connectionError The connection errored:Connection failed This indicates an error whichmost likely cannot be solved by the library.
是 dio 的问题吗?接口是 http://ip:port 的形式
已经在 info.plist 里申明了 http 放行
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict> |
|