Not receiving Events via Facebook iOS SDK
Asked Answered
K

3

7

I have followed all the instructions for setting up the Facebook iOS SDK.

All I want to do is track install events on iPhone devices, so I can run Ads on iOS 14.

I have:

Added my iOS app to my Facebook account

Added the relevant key pairs to Info.plist

<key>CFBundleURLTypes</key>
<array>
  <dict>
  <key>CFBundleURLSchemes</key>
  <array>
    <string>fb{APP_ID}</string>
  </array>
  </dict>
</array>
<key>FacebookAppID</key>
<string>{APP_ID}</string>
<key>FacebookClientToken</key>
<string>{CLIENT_ID}</string>
<key>FacebookDisplayName</key>
<string>{APP-NAME}</string>

Initialised the FB SDK on launch:

MyApp.swift

class AppDelegate: NSObject, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate {
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
        // Facebook Init
        ApplicationDelegate.shared.application(
            application,
            didFinishLaunchingWithOptions: launchOptions
        )
        return true
    }
    func application(
        _ app: UIApplication,
        open url: URL,
        options: [UIApplication.OpenURLOptionsKey : Any] = [:]
    ) -> Bool {
        // Facebook Init
        ApplicationDelegate.shared.application(
            app,
            open: url,
            sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,
            annotation: options[UIApplication.OpenURLOptionsKey.annotation]
        )
    }

The Test Events section of Facebook says:

Open your app and interact with it to start seeing activity.

So I open the app - however there are no events showing up. I restart the app and still nothing.

Any idea what the problem may be? I feel like i'm missing something but can't figure out what.

Kaka answered 31/7, 2021 at 6:48 Comment(7)
Did you figure out the issue? I have the exact same problem. Events manager recognized my updated SDK, but failed to log any events for days.Skinner
same here, integrated everything in a couple of hours, but the "Test Events" section does not show anything...Buzzell
It is still not solved. I contacted Facebook and they acknowledged the problem but do not know when it will get fixed.Kaka
@Kaka Did you figure out the issue? In my case Events manager not recognizing my updated SDK. I already added the latest version of FBSDK 11.3.1Schriever
@Kaka was this solved, I have the exact same problemCombust
@Kaka was this solved, I have the exact same problemSchick
Hi all - unfortunately I never got this solved - so I didn't run ads.Kaka
M
2

Posting incase this helps anybody else out

I got in touch with FB support- the problem was not opting-in to data collection for FB and IG for iOS ATS.

FB instructed to deleted both apps, opt in to allow tracking on both apps then you will be able to see the data populate when testing in the Events Manager.

Mikkel answered 1/4, 2022 at 19:54 Comment(2)
Or, even easier: go to iOS Settings and allow tracking for both apps.Kira
@ThomasWalther tried that prior to this solution, didn't work for me. The reinstall was the only thing that got test data showing up for meMikkel
M
0

In my case, I had to turn on automatic event logging: Events Manager -> Settings -> Automatic event logging for the Facebook SDK.

I started getting events after that.

enter image description here

Machinist answered 5/6, 2024 at 9:42 Comment(0)
M
0

Try reopen fb or switch fb account. When ad track dialog show, agree. Retest the events.

Moen answered 2/8, 2024 at 8:16 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Ibrahim

© 2022 - 2025 — McMap. All rights reserved.