Confused: (2.5) Applications that use non-public APIs will be rejected

I submit my application to the App Store, and after verification it was rejected. Reason from Apple:


2.5: Applications using non-public APIs will be rejected

* We found that your application uses one or more non-public APIs that do not comply with App Store verification guidelines. Using non-public APIs is unacceptable, as this can lead to a bad user experience if these APIs change. The following non-public APIs have been found in your application:

dateWithCalendarFormat: TimeZone:

hourOfDay

minuteOfHour

secondOfMinute

setNavigationBar:

If you define methods in your source code with the same names as the above APIs, we suggest changing the names of your methods so that they no longer run into Apple's private APIs so that your application does not fit into future views.

In addition, one or more of the above APIs may reside in the static library included with your application. If you do not have access to the source of the library, you can search for compiled binaries using the command line tools "line" or "otool". The string tool can list the methods that the library calls, and otool -ov displays the structures of the Objective-C classes and their specific methods. These methods will help you narrow down the location of the problem code. *


But the problem is that I did not declare or define any methods with names as the above APIs. And I did not use any custom library. This is a fairly simple (rigorous) application, and I only used: UIKit, CoreData, AVFoundation, Foundation, and EventKit.

I send a message to Apple yesterday, but there is no answer yet.

Any ideas?

+6
source share
1 answer

You said in the comments above that you used

[[[datePicker date] dateWithCalendarFormat:nil timeZone:nil] hourOfDay] 

Now [datePicker date] returns an NSDate whose documentation shows that there are no public methods called dateWithCalendarFormat:timezone: and hourOfDay , etc.

So you cannot just use them.

Regarding setNavigationBar: navigationBar of UINavigationController property is a readonly property, as stated in the documentation. Therefore, you cannot install it.

When you compile your application, the compiler should have posted a lot of warnings about this, indicating that the selector was not found, etc. You should always consider these warnings as errors and eliminate them. This way you can avoid rejection after submitting.

+4
source

Source: https://habr.com/ru/post/895970/


All Articles