App Store review incorrectly flags category methods as overriding SPI
||Date Originated:||20-Nov-2009 02:21 PM|
||Reproducible:||I Didn't Try|
20-Nov-2009 02:21 PM Andrew Wooster:
RogueSheep recently blogged  that an app of theirs that uses the Three20  framework was rejected because:
"""The notice from Apple indicated that we had used a private method of UIViewController called previousViewController. Interestingly enough, we did not explicitly use this call anywhere in our code. Looking a bit into the version of the Three20 library we were using revealed that it coincidentally contained a category that added a method to UIViewController called previousViewController."""
I believe this to be a false positive. Apologies in advance if I'm wrong. I'm working on very little information here. [*]
** STEPS TO REPRODUCE:
Attached is a test project which should trigger the false positive in your static analyzer (or whatever you're using). It's hard to tell, because I haven't seen this myself and don't have access to the tool itself.
Three20 does have a category on UIViewController which adds the method "-previousViewController". However, Apple does not (as tested with -respondsToSelector:) have a private method called -previousViewController in UIViewController.
The closest I can find, which may be triggering the problem, is the private method -previousViewController defined for UINavigationController, a subclass of UIViewController.
However, the private method on UINavigationController should override the category method defined by Three20, so the category method should not cause any problems in Apple code.
So, I believe whichever tool you're using to determine whether an app is using SPI is flawed and producing false positives.
[*] I am, however, an interested party, in that I work on several apps which use Three20, and could thus be rejected for this reason.
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!