0

I want to create sync manager using AFNetworking 2.0. I have a separate layer where I keep all the AFHTTPRequestOperations and all I want to do is to enqueue them. I am able to do this using the batchOfRequestOperations class method of AFURLConnectionOperation but I am not able to cancel all the operations when one of them fails. In the progress block I check the status code and if for example the status is 404 i cancel all the operations in the queue. The problem is that the next operations always executes.

Mark
  • 3,609
  • 1
  • 22
  • 33
Mihai Popa
  • 892
  • 1
  • 8
  • 25

1 Answers1

0

Check this answer: AFNetwork 2.0 Queue with completion block?

You can check one by one at the progress block to see if one of them cancelled, and cancel all operations in the array.

Community
  • 1
  • 1
Pablo Romeu
  • 2,113
  • 1
  • 13
  • 15