Reputation: 19
How to get urllink data that are stored in database in iphone sdk ?
Upvotes: 0
Views: 59
Reputation: 4789
Use the following Code may be help you.
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"Your URL"]]];
// Perform request and get JSON as a NSData object
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSLog(@"Your Data=%@",response);
id jsonObject = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingAllowFragments error:nil];
Upvotes: 2