Only iOS 7 crash [NSNull intValue]: unrecognized selector sent to instance

前端 未结 4 1230
情话喂你
情话喂你 2021-02-03 11:45

I want to get data from JSON service. Only iOS 7 version crash when get data from JSON value. It returns from JSON service below that:

{
    voteAverageRating =         


        
4条回答
  •  太阳男子
    2021-02-03 12:29

    For me this is worked

    NSArray* merStore = [tmpDictn objectForKey:@"merchantStore"];
    
    if ([merStore isKindOfClass:[NSArray class]] && merStore.count !=0)
    {
        for(int n = 0; n < merStore.count; n++)
        {
            NSMutableDictionary *storeDic = [merStore objectAtIndex:n];
    
    
            [latitudeArray addObject:[storeDic objectForKey:@"latitude"]];
    
        }
    }
    

    I hope it helps some one. If you need any help let me know.

提交回复
热议问题