I'm getting Multiple methods named 'count' found with mismatched result, parameter type or attributes error while building app. The app was working fine in 32 bit. I have changed it to 64 bit as per Apple guideline. I have referred this Link but don't got any help.
I have tested app on multiple devices on simulator. It works fine on 32 bit but prompts error in 64 bit. Why is this so?
-(void)serviceSuccessFulForPatientSelect:(id)response
{
[self hideOverlay];
if([response isKindOfClass:[NSArray class]])
{
if([response count]>0)
{
if(1)
{
...
}
}
}
[refillDetailTable reloadData];
}
if([response count]>0)
response
is an id
here, the error suggests there are multiple methods called count
which return different types - int
and NSInteger
I think are different in 64-bit but the same in 32.
To fix, perform a cast:
if([(NSArray*)response count]>0)
Solution 1: I had declared count as property in a view controller. I renamed it to CountValue and the problem got solved.
Solution 2: You can type-cast to appropriate datatype.
if([(NSArray *) response count]>0) {
...
}
This solution was not feasible in my case since there were 1000s of place containing [response count]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With