I’m currently doing this:
NSMutableDictionary *dict = [[NSDictionary alloc] initWithContentsOfURL: [NSURL URLWithString:@"http://mysite/mypage.php"]];
Which is great, apart from when the data being returned is quite large, and it appears to time out. How could I get around this?
Thanks in advance.
I’m not a big fan of using NSDictionary to manage downloads. I’d probably try something like:
Now, if data is not NULL then save to local file. Then load the dictionary using the contents of that file using the initWithContentsOfFile: method.
If you still get the timeouts you can try larger timeoutIntervals.