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.