I’m currently creating a iOS 5 iPad app where there will be heavy network usage on a local domain, querying and fetching data, uploading and more.
So I’m thinking of creating a network handler that would take care of all these functionalities. Now in iOS/objective-c when you create a class you are really creating a interface of super classes (NSObject, UIViewController etc) and my question is which one would you use? NSURLProtocol?
I’m really new to iOS/Objective-c programming so I’m looking towards getting best practice tips from those more experienced in doing something similar to what I’m trying to do.
All advice would be appreciated.
-MrDresden
If you’re creating a network manager that abstracts all the dirty work, you should make it a subclass of
NSObject, simply. All the work will be done by local instances ofNSURLConnection(though I advise you to use some higher-level framework like AFNetwork which is very good).