6

I can't find the FBSDKSettings class in the newest Facebook SDK version which is on CocoaPods. Can you help?

2 Answers 2

12

It has been renamed like this:

Settings.isAutoLogAppEventsEnabled = true

It is located into Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h file.

1
  • you can also add the plist entry from themenance response above to your info.plist if you want Facebook to turn this off automatically.
    – Xaxxus
    May 5, 2021 at 16:41
11

@Bogy 's answer

Settings.isAutoLogAppEventsEnabled = true

resolves the compilation issue you will get using FBSDKSettings.setAutoLogAppEventsEnabled(true) but there is still a warning logged:

<Warning>: Please set a value for FacebookAutoLogAppEventsEnabled. Set the flag to TRUE if you want to collect app install, app launch and in-app purchase events automatically. 
To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. 
Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#disable-auto-events.

Only adding this to my projects .plist file helped me

<key>FacebookAutoLogAppEventsEnabled</key>
<true/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.