Does it connect successfully to the server, is it called a success block?
Fill the block of failures and the NSLog NSError returned by the block of failures:
failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) { NSLog(@"%@", [error userInfo]); }
I have one more tip, I would recommend creating NSURLRequest with AFNetwork AFHTTPClient, it helps with various things and, as a rule, simplifies the work. You set the base URL and then give it a path to add to this base. Something like that:
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:address]; [httpClient setParameterEncoding:AFJSONParameterEncoding]; NSMutableURLRequest *jsonRequest = [httpClient requestWithMethod:@"POST" path:@"events" parameters:dict];
Also, instead of using valueForKeyPath, I can suggest that you simply make objectForKey:
[JSON objectForKey:@"description"];
Also, you should not access DumpDic:
[operation start]; AboutTXT = [DumpDic objectForKey:@"description"];
This is an asynchronous call, so after the start of a DumpDic operation, it will most likely be available before it is assigned data from the server. This way you gain access to a key that probably doesn't exist yet.
This should be done in a block of success or failure. These blocks are called as soon as the connection is completed and the data is ready for use.
Therefore, it should look something like this:
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { DumpDic = [JSON objectFor:@"description"]; AboutTXT = [DumpDic objectForKey:@"description"]; } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) { NSLog(@"%@", [error userInfo]); }]; [operation start];