iOS App rejected non public api (SSL related) on c

2019-06-10 12:46发布

问题:

I just submitted for review and app built on top of cocos2d-x (C++) and libcurl.

I m using libcurl with SSL support in order to download profile pictures from Facebook

When I validate my app from organiser or trying to distribute I get the following error:

Your app contains non public API usage . please reviex the errors..

The app references non-public symbols in Payload/....app/ {appName}:SSLCopyPeerCertificates, {appName}:SSLDisposeContext etc..

When I search for this functions in the app I get no matches, but I think it s related to libcurl as I dont use SSL expect in code related to libcurl

Any suggestions ?

I sent a message to appreview at apple but I m afraid this might be long.

screenshot of the error : http://accessdev.s3.amazonaws.com/apps/ssl_reject.png

Thanks in advance

回答1:

What I suggest is to use the latest libcurl release, i.e. 7.28.1 version at the time of writing. This includes several fixes related to iOS native SSL APIs, see:

  • http://curl.haxx.se/mail/lib-2012-10/0142.html
  • https://github.com/bagder/curl/commit/f1d2e1850819f54d1c950989614da7445bdd457f

I assume this should solve your issues vs the various symbols your are not supposed to use (SSLDisposeContext, etc).

If I refer to Nick's libcurl 7.28.1 iOS build the non-public symbols that are listed within the Xcode warning window you've attached can't be found:

$ xcrun -sdk iphoneos nm -j -arch armv7 libcurl-device.a 2>/dev/null | grep SSL
_SSLClose
_SSLCopyPeerTrust
_SSLCreateContext
_SSLGetBufferedReadSize
_SSLGetNegotiatedCipher
_SSLGetNegotiatedProtocolVersion
_SSLGetSessionState
_SSLHandshake
_SSLRead
_SSLSetConnection
_SSLSetIOFuncs
_SSLSetPeerDomainName
_SSLSetProtocolVersionMax
_SSLSetProtocolVersionMin
_SSLSetSessionOption
_SSLWrite

Of course the same applies with the armv7s architecture.