Big Bucket Software you like to use
Private API
December 4th, 2009

Recently, Apple started running apps through a static analysis tool to detect calls to private APIs. It flags calls like this one:

if ([someObject respondsToSelector:@selector(somePrivateApi:)])
    [someObject performSelector:@selector(somePrivateApi:)

But just out of curiosity, I wonder if it’s able to pick up a call like this one:

NSString* selectorName = @"somePrivateApi:";

SEL selector = NSSelectorFromString(selectorName);

if ([someObject respondsToSelector:selector])
    [someObject performSelector:selector withObject:foo];

Just sayin’ is all.