thebergamo / react-native-fbsdk-next

MIT License
688 stars 166 forks source link

[HELP] Facebook: Update your apps to the latest Facebook SDK #403

Closed mohammad-goldast closed 1 year ago

mohammad-goldast commented 1 year ago

šŸ› Bug Report

I installed the latest version of this package yesterday for the first time. After all configurations, I saw some new event logs in the Facebook dashboard, and everything seemed Ok.

After a few minutes, the Facebook dashboard showed me an alert to "Update Your Facebook SDK.". I checked the alert, and it suggests adding the FB Pod Kits into the Podfile with the specific version of "8.0.0," and now, I am a little confused because IDK what I should do.

I checked the installed Pod versions by cat Podfile.lock | grep FBSDK. All installed versions were 15.0.0. On the other hand, there is a higher version available, and it is "16.0.0".

Why Facebook suggests installing Pods version "8.0.0"? What should I do to see if everything is right?

This is the alert in the "Overview" section of the Events Manager dashboard:

Update the Facebook SDK for iOS

The latest version of the Facebook SDK supports Appleā€™s SKAdNetwork API, which is required to deliver ads to people using iOS 14.5 or later devices. Learn more We'll also prompt you to send the Advertiser Tracking Enabled flag with your app events. This will allow you to share user consent status and indicate whether you want us to treat an event as opted out from tracking. We created this task to help you reduce the negative impacts of Apple's iOS 14 changes. Visit the Resource Center to learn more.

And, also here is more details of what Facebook suggests:

  1. Update the Facebook SDK for iOS Follow the instructions to update using Cocoapods or SPM. Step 1: Update the Facebook SDK for iOS

Using Cocoapods If your app integrates with the Facebook SDK for iOS using Cocoapods, follow these steps.

  1. Add the code to the podfile for the packages that are used in your app.

Example:

pod 'FBSDKCoreKit', '~> 8.0.0' pod 'FBSDKLoginKit', '~> 8.0.0' pod 'FBSDKShareKit', '~> 8.0.0' pod 'FBSDKGamingServiceKit', '~> 8.0.0'

  1. Run pod update.

Using Swift Package Manager (SPM) If your app uses SPM to integrate with the Facebook SDK for iOS, follow these steps.

  1. In Xcode, click File > Swift Packages > Add Package Dependency.

  2. In Package Repository, enter the repository URL: https://github.com/facebook/facebook-ios-sdk.

  3. In Version, select Up to Next Major and the default option.

  4. Complete the prompts to select the libraries you want to use in your project.

To Reproduce

I did nothing special. Just installed the last version of this package.

Expected Behavior

To not see the "Update Facebook SDK" in the Facebook dashboard.

Environment

System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1
    Memory: 88.11 MB / 8.00 GB
    Shell: 3.5.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.15.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
    Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.17 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: Not Found
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
mikehardy commented 1 year ago

Hi @mohammad-goldast ! Have you checked the issues and PRs in this repository?

This is duplicate.

mohammad-goldast commented 1 year ago

Hi @mikehardy , Thank you for the response. Unfortunately, I can not find an issue or a PR related to this problem. Could you give me a reference, please? I searched in the issues section by these keywords: Update facebook warning, The latest SDK version issue, Update to the latest SDK version and so on.

mohammad-goldast commented 1 year ago

The only thread that I found is #55. IDK, if I update the version of FBSD in react-native-fbsdk-next.podspec file manually, it works or not.

mikehardy commented 1 year ago

https://github.com/thebergamo/react-native-fbsdk-next/pull/339#issuecomment-1483943466 is the one