Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating FB SDK to latest version not working

I have a legacy app that used the old version of FBSDK, and every time I logged in to FB developer dashboard I see this warning:

Your Facebook SDK for iOS is out of date and missing important iOS 11 fixes that make it easier for people to log into your app. Upgrade Now

I have done updated my FB SDK to v4.40.0 using cocoapods (confirmed this by NSLog [FBSDKSettings sdkVersion]). But what confusing me now is the warning still there even though SDK was successfully updated.

FB gave instruction to update:

To make your app compatible with iOS 11, use the latest Facebook SDKs for iOS. If you link to the SDKs with CocoaPods, you must update your pods for the SDKs your app uses and recompile your app. You can also download the latest version of the Facebook iOS SDK, integrate it into your app, and recompile.

What I've done so far is :
• Update SDK using cocoapods ✅
• Recompile app ✅

Does anyone know that is the real reason why the warning doesn't disappear.

Thanks in advance.

like image 986
Afiq Hamdan Avatar asked Oct 26 '25 07:10

Afiq Hamdan


1 Answers

I know it's an old query but still if someone stumbles upon it, here are a few things you may consider.

a)Facebook needs to receive an app event in order to reflect the update on the dashboard. Try to trigger an event. For example, launch the app.

b)Check if you're initialising the SDK properly. In didFinishLaunchingWithOptions add ApplicationDelegate.shared.initializeSDK().

c)Since Apple is strictly monitoring user consent for App Tracking, add FacebookAutoLogAppEventsEnabled & FacebookAdvertiserIDCollectionEnabled to info.plist and set appropriate boolean values respectively.

Recommended way is to set the same as false, ask the user for consent and on approval, set the values to true. Use the following code for the same.

if #available(iOS 14, *) {
      ATTrackingManager.requestTrackingAuthorization { status in
        switch status {
        case .authorized:
          Settings.shared.isAdvertiserTrackingEnabled = true
          Settings.shared.isAdvertiserIDCollectionEnabled = true
        case .denied:
          Settings.shared.isAdvertiserTrackingEnabled = false
          Settings.shared.isAdvertiserIDCollectionEnabled = false
        default:
          Settings.shared.isAdvertiserTrackingEnabled = false
          Settings.shared.isAdvertiserIDCollectionEnabled = false
        }
      }
}

d) Sometimes, the minimum deployment target of your application could be preventing the SDK to update to latest version. To confirm if that's the case, set the pod to latest version in podfile as following:

pod 'FBSDKCoreKit', '~>15.0.0'

update the pods using pod update or pod install If the minimum deployment target is hindering the update, you'll receive an error like this:

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
  In Podfile:
    FBSDKCoreKit (~> 15.0.0)

Specs satisfying the `FBSDKCoreKit (~> 15.0.0)` dependency were found, but they required a higher minimum deployment target.

If this occurs, try changing the minimum deployment target of your app. Also ensure that the platform in your podfile is also set to the new and higher minimum deployment target such as platform :ios, '12.0'.

Hope this helps you!

like image 192
The Pedestrian Avatar answered Oct 29 '25 09:10

The Pedestrian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!