Tag Archives: objective c

Waiting for multiple uploads with AFNetworking

In working with networking and uploads and downloads via objective c I ended up using the AFNetworking framework. This is a great framework with excellent documentation but I struggled to understand how to wait for multiple uploads to finish before forwarding the customer onto a new view. Waiting for multiple uploads is synchronous and networking is asynchronous.

The basis of what I used to do multiple operations
AfNetworking FAQ on multiple operations

Networking is asynchronous
Afnetworking can enqueue multiple operations and then try and wait for them.  The problem is that the program will run through the method definition for networking and return back to the calling code before all operations have completed unless the operations are waited for by some mechanism.

Things that do Not work

Afnetworking and has the ability to wait for a single operation or wait for multiple operations to finish but I found it was only works when doing downloads.

There are ways to wait for downloads via the AFNetworking by

Continue reading

Advertisements