我是iOS和Swift开发的新手,而且我不习惯在通常的程序中管理网络可达性。
I'm new in iOS and Swift development, and i'm not used to manage the network reachability in my usual programs.
我找到了AFNetworking和Alamofire,是缓解iOS中API调用的好框架。
I found AFNetworking and Alamofire which are great frameworks to ease the API calls in iOS.
但是我很难弄清楚如何发出一些请求,直到我松开网络才回来。 通常在会话登录或获取一些json列表或下载图像期间。
But i have difficulties to figure out how to make some requests to wait until network is back if i'm loosing it. Typically during session login or getting some json lists or downloading images.
您是否可以依靠一些教程或示例来提高自己的知识并能够建立强大的应用程序以抵抗网络可用性?
Do you have some tutorials or examples i can rely on to improve my knowledge and be able to build a strong application resilient to network availability ?
推荐答案现在Alamofire刚刚包含了网络状态监听器
now Alamofire has just included a Network status listener
github/Alamofire/Alamofire/pull/ 1053
更多推荐
iOS / Swift:如何使用Alamofire管理网络多功能性
发布评论