6

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

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
SeverinCH3047
  • 121
  • 1
  • 6

2 Answers2

12

It has been renamed like this:

Settings.isAutoLogAppEventsEnabled = true

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

Bogy
  • 944
  • 14
  • 30
  • 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 05 '21 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/>
themenace
  • 2,601
  • 2
  • 20
  • 33