APIAvailability seems to not handle ?: operator

Issue #54 closed
Jaakko Kangasharju created an issue

I have the APIAvailability rule with false positive avoidance turned on. It seems to avoid false positives quite well when method invocations are inside if statements, but there are a few places in the project with code like this:

return [image respondsToSelector:@selector(imageWithRenderingMode:)] ? [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] : image;

and the rule warns about these. (The project deployment target is 6.0, imageWithRenderingMode: was introduced in 7.0.)

It would be nice if the false positive avoidance could also avoid these cases.

Comments (4)

  1. Log in to comment