I have the following code that loads a plist file from the resource folder and uses it to populate a tableview:
NSString *path = [[NSBundle mainBundle] pathForResource:@"AnimeDB" ofType:@"plist"];
NSMutableArray* tmpArray = [[NSMutableArray alloc] initWithContentsOfFile:path];
self.dataList1 = tmpArray;
[tmpArray release];
But I need to load this .plist file from an url. I tried some solutions that I found on the net, but I couldn't manage to get it working. Does someone know how can i do this?
Maybe there's an easy solution, but I'm at the beginning with xcode (this is my first app), so I can't find it.
Any help is really appreciated!
P.S. Sorry for any mistake that i may have committed, my english is not that good.
I suggest looking into using Json. It will allow you to pass plist like structured data from a url to your app.
If you want to use your plist then its just about the same code:
In the end I managed to do what I needed using just this simple piece of code:
And it works like a charm! Thanks to everyone who spent time answering my question, in particular thanks to Jaybit!