With AFNetworking
you usually enqueue operations by doing the following:
[_httpClient enqueueHTTPRequestOperation:operation];
Is there a way to serialize or save the queue so it can be resumed after App Termination?
Actually if you look into AFURLConnectionOperation
it implements NSCoding
protocol, and .m
file reflects that by implementing initWithCoder:
and encodeWithCoder:
methods
Although AFHTTPClient
base class is NSCoding
compliant too it doesn't serialize queue itself
But nothing stops you from leveraging existent codebase and extending encoding/decoding feature to serialize queue operations in you custom subclass of AFHTTPClient
Hope it makes sense!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With