iosiphoneapp-store-connectiphone-privateapi

Meaning of - Apps that use non-public APIs will be rejected


Our app has been rejected by iTunes because of using non-public APIs

We found that your app uses one or more non-public APIs, which is not in compliance with the App Store Review Guidelines. The use of non-public APIs is not permissible because it can lead to a poor user experience should these APIs change.

We found the following non-public API/s in your app: .......

If you have defined methods in your source code with the same names as the above-mentioned APIs, we suggest altering your method names so that they no longer collide with Apple's private APIs to avoid your application being flagged in future submissions.

What is the meaning of that rejection?

Does it means:there are some Apple interface "SomeAppleInterface"

// SomeAppleInterface.m
@implementation SomeAppleInterface

- (void)SomePrivateAPI // this api doesn't exists in SomeAppleInterface.h file
{
// ... some code
}

and in my code I call to a private API of Apple class:

- (void)MyCodeMethod 
{
    SomeAppleInterface x;
    [x SomePrivateAPI];
}

is it the meaning of this error? If yes how could I call to this private method, it is not mentioned in h file? Please help me to understand.


Solution

  • You are asking for clarification for a rejection that is, most likely, simply an error on Apple's part. This list looks like a bunch of false positives. All they're saying is that you appear be calling a bunch of methods that they believe to be part of the private API.

    In this question, you provide a straw man, showing us an invocation of a private method which will not compile. You seem to be asking "how could I have accidentally called the Apple private API?"

    The thing is, it's really hard to accidentally call the private API. You'd could create a category @interface that exposed the private API. There are other ways, too, but this simply isn't something you can accidentally do. You have to consciously take steps to call a private API.

    So the question becomes how one could get a false positive report from Apple. It's possible that you're not using Apple's private API at all, but happen to have methods in your own classes with the same signature. This might result in a false positive which can be resolved by simply changing the name of your method.

    But in this case, I think there is something completely different going on and I don't think it's worth trying to track it down until you hear back from Apple. There's no point in getting all lathered up about it until you hear back from them.