Skip to content

Small sample project to create multiple instances of an NSOperation that run NSURLConnections with delegate methods

Notifications You must be signed in to change notification settings

andy-cam/iOS-Simultaneous-Async-NSURLConnections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

This small example project demonstrates how to subclass, instantiate and run
multiple instances of an NSOperation that is an NSURLConnection delegate. 

I initially created it to assist on a StackOverflow question I asked
(http://stackoverflow.com/questions/9684770/run-multiple-instances-of-nsoperation-with-nsurlconnection) 
because it wasn't running the NSURLConnections correctly, but having since gotten it
working I decided to leave this here as a helpful code snippet to anyone else who 
might have arrived here with the same issue!

The class initially was intended to run only 1 NSOperation at a time as part of a much larger
project due to the memory constraints of current/previous-gen iDevices, but for smaller 
downloads you can easily bump up that limit, just change the line in LibSync.m:
 
    [operationQueue setMaxConcurrentOperationCount:1]; // Can set this as needed
    
Hope this helps someone! Happy coding

About

Small sample project to create multiple instances of an NSOperation that run NSURLConnections with delegate methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published