这就是返回错误的原因:
NSMutableArray *newArray = [[[NSMutableArray alloc] initWithArray:[NSJSONSerialization JSONObjectWithData:[[[appDelegate.Matches objectAtIndex:(NSUInteger)indexPath] objectForKey:@"chat"] dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil]] addObject:[NSDictionary dictionaryWithObjectsAndKeys:message, @"message", [NSString stringWithFormat:@"%llu", appDelegate.userId], @"id", nil]];
最佳答案
“神圣的连续表达, bat 侠!”
如果您将其分成多行,您可以轻松看出问题出在哪里。
或者,更有可能的是,错误会神秘地消失。
问题在于 addObject:
返回 (void)
,但您试图将该方法的返回值分配给变量。
关于iphone - 使用不兼容的 void 类型初始化 NSMutableArray __strong,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10790531/