-->

Apps that use non-public APIs will be rejected

2019-09-09 10:22发布

问题:

our app have been rejected by apple with the following message: (i put in column the location of any api mentioned)

We found that your app uses one or more non-public APIs, which is not in compliance with the App Store Review Guidelines. The use of non-public APIs is not permissible because it can lead to a poor user experience should these APIs change.

We found the following non-public API/s in your app:

  • BuyFreeWinTicket_marshal___:numbers:os:, (my internal code)
  • getCellValidationInfo_unmarshal___:ok:, (my internal code)
  • AddAnimationPointForBall:nextX:nextY:forDuration:, (my internal code) UIViewController, (?)
    • addSessionCookie:, (my internal code)
    • CanDoAutomaticLogin, (my internal code)
    • activeSessionIfExists, (my internal code)
  • AddSeperatorsToNumber:, (my internal code)
  • addRequestToExtendTokenForSession:connection:, (my internal code)
    • cworksImpression, (?)
  • AddFilterWithInex:, (my internal code)
  • ApplySuperKeypad, (my internal code)
  • applicationDidOpenURL:sourceApplication:, (my internal code)
    • clearPersistedAppEventData, (?)
  • canPresentMessageDialog, (?)
  • applicationDidOpenURL:sourceApplication:, (my internal code)
  • DeleteOldLogLines, (my internal code)
  • hideAllHUDsForView:animated:,(my internal code)
  • ServerRegistrationResponseOk:, (my internal code)
  • requestForCustomAudienceThirdPartyID:, (?)
  • automaticallyNotifiesObserversForKey:, (?)
  • addOrRemovePendingConnection:, (?)
  • addHEADOperation:, (3rd party ASIHTTPRequest) NSOperationQueue, (3rd party ASIHTTPRequest) -DisplayUserSuspendedDialogWithMessage:ReleaseByCaptcha:CaptchaURL:AndReturnTo:, (my internal code)
    • likeActionControllerForObjectID:, (?)
  • _parseDialogConfigs:, (?)
  • BackFromLottoLoginForNag:withEmail:andPassword:, (my internal code)
    • cacheRefreshDelay, (?) FBViewController, (3rd party - looks like FB SDK)
  • deleteUnitTestUser:accessToken:, (?)
  • FathersAndMothersDisplayMothers:, (my internal code)
  • addRoundedRectToPath:rect:radius:, (?)
  • connection:didFailWithError:, (?)
  • createTokenFromDictionary:, (?)
  • FBSDKInitializeWithLaunchData:, (3rd party - looks like FB SDK)
  • fileExtensionsToHandleAsHTML, (3rd party ASIHTTPRequest)
  • _analyticsParameters, (?)
  • _copyValueForKey:fromDictionary:toDictionary:, (?)
  • appCallFromApplinkArgs_v2:applinkArgs:createTimeUTC:originalQueryParameters:, (?)
  • requestWithUserID:fields:dataSource:session:, (?) FBGraphObjectPickerViewController, (3rd party - looks like FB SDK)
  • DisplayErrorConnectingToCheckoutServer, (my internal code)
  • graphObjectWrappingDictionary: (?)

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, one or more of the above-mentioned APIs may reside in a static library included with your application. If you do not have access to the library's source, you may be able to search the compiled binary using "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 techniques can help you narrow down where the problematic code resides.

  1. is that message means that Apple has Private APIs with the same signuture as the APIs mentioned above? (it means they use "-DisplayUserSuspendedDialogWithMessage:ReleaseByCaptcha:CaptchaURL:AndReturnTo:" as private signature - it is not possible)

  2. how could we solve the problem - do we need to change all the above API names?

  3. how could we verify we fix the problem or could we get the same error by myself (i've tried using app sccanner - it didn't find any private Api, and i've tried to use strings and otool but i don't understand what i need to look for)

it would be very helpful if someone could help us on it

about 3rd parties - we use FB SDK (ver 3.19), ASIHTTPRequest