My application was denied due to non-public APIs

There are reviews from Apple: Your application uses or refers to the following non-public APIs:

  • " init: "

Using non-public APIs is not allowed in the App Store, as this can lead to poor user experience when changing these APIs.

What bothers me the most is that "init:", I mean, what's wrong with "init:"? Can't we use "init:"? What else, when we use non-public APIs, is there any warming in Xcode? How to find these non-public APIs?

+5
source share
1 answer

You really shouldn't use anything called init: It would be an init method with one parameter, but did not explain what the parameter was. For instance:

 - (instancetype) init:(NSString *)string; 

That would always be the wrong name. The correct name will be:

 - (instancetype) initWithName:(NSString *)string; 

(or initWithTitle: or initWithSomeOtherThingButSomething:

Therefore, I would first look for init: and this should be easily fixed. If you don’t actually have methods with this name, this may be a bug in the Apple tool, and you will need to discuss this with Apple.

+3
source

All Articles