I have used link code for send and get json data.
I modified the code for sync data with the web server using following code.
- (IBAction)syncTickets:(id)sender {
[self postTest];
[self getTest];
}
I have override getTest function to save data into the phone database. I got an error:
Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed.
(Cocoa error 3840.)" (JSON text did not start with array or object and option to allow
fragments not set.) UserInfo=0x987b960 {NSDebugDescription=JSON text did not start
with array or object and option to allow fragments not set.
}
It only happens when I am syncing for the first time afterwards it works fine.