3

I'm trying to submit my app on the App Store but I'm getting this msg:

Your app contains non-public API usage. Please review the errors, correct them, and resubmit your application.
The app references non-public symbols in Payload/XXX.app/XXX: CFUserNotificationDisplayNotice

Where "XXX" -- application name.

Can anybody help me with this issue?

Monolo
  • 18,205
  • 17
  • 69
  • 103
kroumvud
  • 358
  • 6
  • 19
  • 2
    So are you using the `CFUserNotificationDisplayNotice()` function? –  May 27 '13 at 13:03
  • Thank you for your reply, No, I don't use this method... Even more I'm don't know this class.. – kroumvud May 27 '13 at 13:06
  • 1
    @kroumvud: are you using any third-party libraries in your app ? – Midhun MP May 27 '13 at 13:09
  • Yes, I'm use one custom library for sending special data to server. – kroumvud May 27 '13 at 13:14
  • 2
    Maybe try an extensive search on "CFUserNotificationDisplayNotice" in your project source, and your third-party libs sources as well... – Vinzzz May 27 '13 at 13:17
  • I searched "CFUserNotificationDisplayNotice" in my project and do not get any results :( Can to solve this issue with adding CoreFoundation library to the project? – kroumvud May 27 '13 at 13:21
  • Unfortunately, adding CoreFoundation library does not fixed this issue. Any other ideas? – kroumvud May 27 '13 at 14:10
  • 1
    @kroumvud No, this isn't related to that. In what form does the 3rd-party library come? Source or binary? –  May 27 '13 at 14:29
  • @H2CO3 Unfortunately, I have only binary file. – kroumvud May 28 '13 at 08:12
  • 2
    @kroumvud Then do an `otool -tv | grep CFUserNotification` to the binary - if it finds anything, then the 3rd-party library uses that private function. –  May 28 '13 at 08:14
  • @H2CO3 I have tried to check lib with command `otool-tv lib.a | grep CFUserNotification` in the terminal, but output is empty :( I can contact with developer of this library. What need to change in the lib sources for correct work? – kroumvud May 28 '13 at 08:50
  • @H2CO3 Also I'm tried other command `nm -arch armv7 lib.a | egrep CFUserNotification`. In this case output in the terminal looks like: `nm: no name list nm: no name list U _CFUserNotificationDisplayNotice nm: no name list nm: no name list nm: no name list nm: no name list nm: no name list nm: no name list` – kroumvud May 28 '13 at 08:53
  • 1
    @k FYI, it's `otool -tv`, not `otool-tv` - the latter one doesn't exist, so it's natural you got an empty output from that. –  May 28 '13 at 08:59
  • @H2CO3 I'm double checked command in terminal and enter command with "space" in the `otool -tv`, but nothing changed, output is empty – kroumvud May 28 '13 at 10:16
  • 1
    Thanks to all who responded, I was contacted with library developer and he rebuilt it without the CFUserNotificationDisplayNotice methods – kroumvud May 28 '13 at 19:17
  • How you came to know which library using CFUserNotification?. – Brjv Sep 26 '14 at 06:15
  • @raj I had a only one third-party library in my app. But I think you can try to check all you libraries with otool command. – kroumvud Sep 30 '14 at 14:39

1 Answers1

-1

A private API is an API that is not intended to be used by outside developers. This is to prevent breaking changes when the SDK is updated.

The behavior of a private API is not guaranteed. The methods may be removed in the future updates of the platform.

You can use the private API's in you OSX and iOS apps if you don't intend to release through Apple App Store, but then, again you yourself need to make sure that your app is not broken by the comming SDK/OS updates.

Either you or some third party framework in your bundle is using private APIs

Remove the signature mentioned from the code and you should be fine.

David Karlsson
  • 9,396
  • 9
  • 58
  • 103