Cannot find 'ApplicationDelegate' in scope

Viewed 6537

I am installing the Facebook Graph API and Im currently stuck on the following. It seems like I am unable to find the Application Delegate from the Scene Delegate.

If you are using iOS 13 or above please add the following method to your SceneDelegate

// Swift
//
// SceneDelegate.swift

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
    guard let url = URLContexts.first?.url else {
        return
    }

    ApplicationDelegate.shared.application(
        UIApplication.shared,
        open: url,
        sourceApplication: nil,
        annotation: [UIApplication.OpenURLOptionsKey.annotation]
    )
}

When I apply the above I get the following error.

Cannot find 'ApplicationDelegate' in scope
1 Answers

import FBSDKCoreKit in your SceneDelegate And It Works Fine

Related