On iOS15 don't see app events in Events Manager. Both on "overview" and "test events" tabs.
Asked
Active
Viewed 1,965 times
1 Answers
7
There is one important thing missed in facebook app events docs. To make facebook app events work on iOS 14+ app MUST request user for tracking. Here is example:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {[weak self] in
self?.requestTracking()
}
return true
}
func requestTracking(){
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { (status) in
switch status{
case .authorized:
Settings.shared.isAutoLogAppEventsEnabled = true
Settings.shared.isAdvertiserTrackingEnabled = true
Settings.shared.isAdvertiserIDCollectionEnabled = true
break
case .denied:
Settings.shared.isAutoLogAppEventsEnabled = false
Settings.shared.isAdvertiserTrackingEnabled = false
Settings.shared.isAdvertiserIDCollectionEnabled = false
break
default:
break
}
})
}
}
Otherwise Facebook app events will work only if app been authorised throw Facebook sign in.

Kirill Pyulzyu
- 381
- 2
- 11
-
as mentioned in FB docs: "Get Device Consent Starting with iOS 14.5, you will need to set isAdvertiserTrackingEnabled and log each time you give a device permission to share data with Facebook. If a device provides consent, set Settings.shared.isAdvertiserTrackingEnabled = true. If a device does not allow tracking, set Settings.shared.isAdvertiserTrackingEnabled = false." – Michael42 May 13 '22 at 08:54