I can't find the FBSDKSettings class in the newest Facebook SDK version which is on CocoaPods. Can you help?
Where is the FBSDKSettings.setAutoLogAppEventsEnabled(true) method?
Asked Answered
It has been renamed like this:
Settings.isAutoLogAppEventsEnabled = true
It is located into Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h file.
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
@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/>
© 2022 - 2024 — McMap. All rights reserved.