Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dispatch_queue_t downloadQueue = dispatch_queue_create("downloader", NULL);
- dispatch_async(downloadQueue, ^{
- NSData *result = self.envoyerLaDemande;
- dispatch_async(dispatch_get_main_queue(), ^{
- id strResult=nil;
- strResult = [NSJSONSerialization JSONObjectWithData:result options:0 error:nil];
- NSLog(@"strResult: %@", strResult);
- NSString* boolOk=[strResult objectForKey:@"result"];
- NSLog(@"BoolOk: %@", boolOk);
- $data = array();
- if(condition == 1)
- {
- $data["result"] = "ok";
- }
- else
- {
- $data["result"] = "error";
- }
- $data["result"] = "coucou";
- }
- echo json_encode($data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement