I want to get data from a JSON service. Only iOS 7 crashes when retrieving data from a JSON value. It returns from the JSON service below:
{ voteAverageRating = 0; voteCount = 0; }
My code
int voteCount = [listDic objectForKey:@"voteCount"] intValue] ; _LB_voteNumber.text = [NSString stringWithFormat:@"(%i)",voteCount];
His work for iOS 5,5,1,6,0,6.1, but it crashed only into the version of iOS7. He gave this error:
0x00098117 _mh_execute_header [NSNull intValue]: unrecognized selector sent to instance
Then I changed my code below this;
NSString *voteCount = [listDic objectForKey:@"voteCount"] ; _LB_voteNumber.text = [NSString stringWithFormat:@"(%@)",voteCount];
When running this code. He crashed again only on iOS 7. He gave this error:
0x00098117 _mh_execute_header [NSNull length]: unrecognized selector sent to instance
How can I solve this problem?
json ios objective-c iphone ios7
Sukruk
source share