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
Adding Constraints Programmatically in UIview with UItextview
How to Prevent SQL Injections with User-Search-Terms in Vapor 4 (Fluent 4)
Alamofire Request Not Working in Swift 4 Project
How Do Uniqueness Constraints as (Comma,Separated,Attributes) Work with Swift in Coredata
Access Each Header and Controls in The Tableview in Swift
Swift: Get The Compile Time Name of Variable (Referencing to a Class)
Saving an Array of Nsurl to Nsuserdefaults
List Inside Scrollview Is Not Displayed on Watchos
Map Dictionary Keys to Add Values - Swift
How to Pass a String Containing Markdown to Custom View
#If Canimport(Coreimage) Not Working in Swift Package Manager
How to Set Default Clouse Param in View Method
Swift "Print" Doesn't Appear in Stdout But 3Rd Party C Library Logs Do When Running in Docker on Ecs
Why Is This Predicate Format Being Turned into '= Nil'
How to Display an Alert Controller When Nsdate == to a Time (For Example 12:00 Am) in Swift
Swift: Check Which Value in Nsarray Is Closest to Another Given Value
How to Stop Firestore Pagination When Searched Data Are Loaded in Tableview