Is it necessary to add FBSDKAppEvents.activateApp()
to applicationDidBecomeActive
when FacebookAutoLogAppEventsEnabled
is not set to false
?
According to FBSDKAppEvents.h
it is not necessary:
Notifies the events system that the app has launched and, when appropriate, logs an "activated app" event. This function is called automatically from FBSDKApplicationDelegate applicationDidBecomeActive, unless one overrides 'FacebookAutoLogAppEventsEnabled' key to false in the project info plist file. In case 'FacebookAutoLogAppEventsEnabled' is set to false, then it should typically be placed in the app delegates'
applicationDidBecomeActive:
method.
This is confirmed by the FB docs where adding activateApp
is under "Manual Event Logging":
The process described here for manual event logging with the SDK is provided so that you have the option of controlling when app events are logged. We recommend that you do not disable automatic logging because it may impact how data is collected for your app.
However, in the Swift Reference it says:
Logging app activations as an app event enables most other functionality and should be the first thing that you add to your app.
So should it be added or is it called automatically for Swift apps?
facebook-ios-sdk
tag if questions regarding the product should not be asked here? At some point a product becomes so popular that using it becomes an integral part of software development, and I think that is what SO is all about. – Whalen