Where is the FBSDKSettings.setAutoLogAppEventsEnabled(true) method?
Asked Answered
S

2

6

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

Slimsy answered 17/12, 2019 at 12:38 Comment(0)
B
12

It has been renamed like this:

Settings.isAutoLogAppEventsEnabled = true

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

Boeotian answered 17/12, 2019 at 12:47 Comment(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.Recumbent
B
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/>
Booher answered 8/1, 2020 at 10:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.