Setadvertisertrackingenabled Is Not Found in Settings Class of Fbsdk

setAdvertiserTrackingEnabled is not found in Settings Class of FBSDK?

The Facebook documentation is not yet updated to match the new changes in version 11 (you can notice the second image in the iOS App Event setup contains a screenshot of version 5.10.0)

If you installed FBAudienceNetwork using cocoapods in Xcode, you can inspect and deduce that Settings class was renamed to FBAdSettings. To validate this, you can find the method you mentioned in the following directory: Pods > Pods > FBAudienceNetwork > FBAdSettings.h > +setAdvertiserTrackingEnabled

Hence, you should change your code to the following:

FBAdSettings.setAdvertiserTrackingEnabled(true)

iOS 14 get user consent with Facebook SDK

The documentation is at least misleading. You have to import FBSDKCoreKit.FBSDKSettings and the snippet is Settings.setAdvertiserTrackingEnabled(true). As you can see, it is not FBAdSettings but only Settings.



Related Topics



Leave a reply



Submit