AFNetworking 2.0 and use cache only when offline

后端 未结 1 1837
慢半拍i
慢半拍i 2021-01-03 14:16

I have a problem when users use my app and they lost connection or use airplane mode.

My app server side doesn\'t set any cache policy and for the time being I can\'

相关标签:
1条回答
  • 2021-01-03 15:07

    You just need to subclass the AFHTTPSessionManager and check if the client is offline. Then you can change the cache policy or force the app to use cached data.

    0 讨论(0)
提交回复
热议问题