5

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.

Asperi
  • 228,894
  • 20
  • 464
  • 690
Zorgan
  • 8,227
  • 23
  • 106
  • 207

1 Answers1

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.

jakeo
  • 61
  • 4