Private API Rejections
Update: Various sources report that Apple fixed this issue internally and updated its internal filter list to remove “obvious” names that likely clash. The last report about this issue was in late September 2016.
Shortly before the release of iOS 10 in early September 2016, Apple changed something in its review process, and as a result, we see many apps being rejected for “non-public API” usage, with a message similar to the one at the end of this article. These are in fact not calls to a private API, but rather simple selector name clashes, where PSPDFKit has internally named a method the same as one that Apple uses internally. Since these internal names are not documented and cannot be verified offline, there is no way for us to anticipate which names are supposedly reserved.
The rejection is invalid. We opened up rdar://28252227: Incorrect App Store rejections for name clashes on methods that happen to be named like private API for Apple to look into this particular problem. We were not the only ones encountering this issue in September 2016.
We care about good bug reports at PSPDFKit. You can help by duping our radar to show that this issue is of the utmost importance.
What you can do to get your app in the App Store:
- Update to PSPDFKit 5.5.5 or 6.x for iOS. We have renamed the affected methods and these builds are known to work.
- Appeal and list rdar://28252227 as the reason.
- Simply resubmit with a higher build number.
This review seems to be both arbitrary and applied at random. We received reports that developers submitted the exact same app binary, but changed the build number to allow resubmission, and it went through without any issues.
PSPDFKit is a large SDK and we have a lot of internal APIs for offering features like fast document display, links, smart zoom, and annotation editing. As such, we have a larger internal target area. Using Swift would help somewhat, as it namespaces selectors if not exported to Objective-C. We cannot use Swift since it is not yet binary compatible. However, we use C++ to both minimize such issues and to offer better speed and a better tested/more stable codebase.
Here’s a typical rejection email
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
From: Apple Date: 24/09/2016 2. - 5 PERFORMANCE: SOFTWARE REQUIREMENTS Performance - 2.5.1 Your app uses or references the following non-public APIs: titleForSection: The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change. Next Steps Please revise your app to remove any non-public APIs. 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. Additionally, if you are using third party libraries, please update to the most recent version of those libraries. If you do not have access to the libraries’ source, you may be able to search the compiled binary using the “strings” or “otool” command line tools. The “strings” tool can output a list of the methods that the library calls and “otool -ov” will output the Objective-C class structures and their defined methods. These tools can help you narrow down where the problematic code resides. You could also use the “nm” tool to verify if any third-party libraries are calling these APIs. Resources For information on the “nm” tool, please see the “nm tool” Xcode manual page: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/nm.1.html If there are no alternatives for providing the functionality your app requires, you may wish to file an enhancement request: https://developer.apple.com/bug-reporting/ If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions: https://developer.apple.com/library/content/qa/qa1764/ If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support: https://developer.apple.com/support/technical/ When the DTS engineer follows up with you, please be ready to provide: - complete details of your rejection issue(s) - screenshots - steps to reproduce the issue(s) - symbolicated crash logs - if your issue results in a crash log: https://developer.apple.com/library/content/technotes/tn2151/_index.html
We’ll keep this page updated as we learn more about this issue, but you can fully expect that this is a temporary issue and that Apple will fix the process.