From 5160dab8416cd055bbe4499e1784dfcf0cc9c7d9 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Wed, 3 Aug 2016 11:39:30 -0700 Subject: [PATCH] Rename ApplicationDelegate to SDKApplicationDelegate to avoid name clashes. --- Samples/Catalog/Sources/AppDelegate.swift | 10 +++++----- Sources/Core/Common/ApplicationDelegate.swift | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Samples/Catalog/Sources/AppDelegate.swift b/Samples/Catalog/Sources/AppDelegate.swift index 2f9d1518..3fdb4924 100644 --- a/Samples/Catalog/Sources/AppDelegate.swift +++ b/Samples/Catalog/Sources/AppDelegate.swift @@ -28,16 +28,16 @@ final class AppDelegate: UIResponder { extension AppDelegate: UIApplicationDelegate { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions) + SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions) return true } func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { - return ApplicationDelegate.shared.application(application, - openURL: url, - sourceApplication: sourceApplication, - annotation: annotation) + return SDKApplicationDelegate.shared.application(application, + openURL: url, + sourceApplication: sourceApplication, + annotation: annotation) } func applicationDidBecomeActive(application: UIApplication) { diff --git a/Sources/Core/Common/ApplicationDelegate.swift b/Sources/Core/Common/ApplicationDelegate.swift index ee3a9c0d..22fc7c8c 100644 --- a/Sources/Core/Common/ApplicationDelegate.swift +++ b/Sources/Core/Common/ApplicationDelegate.swift @@ -21,22 +21,22 @@ import UIKit import FBSDKCoreKit /** - The ApplicationDelegate is designed to post process the results from Facebook Login or Facebook Dialogs + The `SDKApplicationDelegate` is designed to post process the results from Facebook Login or Facebook Dialogs (or any action that requires switching over to the native Facebook app or Safari). The methods in this class are designed to mirror those in UIApplicationDelegate, and you should call them in the respective methods in your AppDelegate implementation. */ -public final class ApplicationDelegate { +public final class SDKApplicationDelegate { private let delegate: FBSDKApplicationDelegate = FBSDKApplicationDelegate.sharedInstance() /// Returns the singleton instance of an application delegate. - public static let shared = ApplicationDelegate() + public static let shared = SDKApplicationDelegate() private init() { } } -extension ApplicationDelegate { +extension SDKApplicationDelegate { /** Call this function from the `UIApplicationDelegate.application(application:didFinishLaunchingWithOptions:)` function of the AppDelegate of your app It should be invoked for the proper initialization of the Facebook SDK.