Search code examples
iosswiftfacebookfacebook-graph-apiappstore-approval

iOS App Rejection due to private API call viewControllerForView:, Facebook API


My app was rejected because

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.

in the method

viewControllerForView:

I asked where I used viewControllerForView: and they responded

“viewControllerForView:” was found in the methods: -[FBSDKLikeButton _handleTap:] and -[FBSDKLikeButton _like:].

My FBSDKLoginKit, FBSDKCoreKit and FBSDKCoreKit pods are all at 4.15.1 (the latest version). How should I go about fixing this?


Solution

  • You don´t need to make any changes in your code, read this post from Facebook developers of how to solve it.

    After integrating our SDK into your iOS app, you will need to submit your app to Apple for review. As part of this review process, you will be asked if your app uses the Advertising Identifier (IDFA). Please check "Yes". You will then be asked how your app makes use of it. The question will take this form: This app uses the Advertising Identifier to (select all that apply)? - Serve advertisements within the app - Attribute this app installation to a previously served advertisement - Attribute an action taken within this app to a previously served advertisement

    If you will be using the Audience Network framework, you must select the first option. If you are using our core framework to track install attribution and app events, please select the second and third options. If you are using both, select all three.

    You will also be asked to check a box to confirm that your app honors a user's Limit Ad Tracking setting in iOS. The Facebook SDK honors the iOS Limited Ad Tracking Setting. When a person enables Limited Ad Tracking, Facebook only uses data obtained through the use of the Advertising Identifier for “Limited Advertising Purposes” as defined by the iOS Developer Program License Agreement. Please make sure check this box when prompted.

    Marking these questions in this way will help ensure a smooth review process