Implicit conversion of NSInteger error

跟風遠走 提交于 2019-12-04 22:52:10

The parameter type for withValue is an id (a pointer). NSInteger is a scalar value (not an object) and cannot be converted to a pointer value implicitly.

This is purely a guess, but creating an NSNumber from the NSInteger might work:

NSNumber *val = [NSNumber numberWithInteger:clienNumber]
ClientInfo *clientSelected = [ClientInfo MR_findFirstByAttribute:@"aClientNumber" withValue:val inContext:localContext];

As per your definition of method it's expecting and id and your are passing it a NSInteger aka int

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!