iOS 由于私人 API 调用 viewControllerForView:,Facebook API 导致应用被拒绝

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

我的应用被拒绝了,因为

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.

在方法中

viewControllerForView:

我问我在哪里使用 viewControllerForView:,他们回答说

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

我的 FBSDKLoginKit、FBSDKCoreKit 和 FBSDKCoreKit pods 都是 4.15.1(最新版本)。我应该如何解决这个问题?

您无需对代码进行任何更改,阅读 this post Facebook 开发人员的解决方法。

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