Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
Rename ApplicationDelegate to SDKApplicationDelegate to avoid name cl…
Browse files Browse the repository at this point in the history
…ashes.
  • Loading branch information
nlutsenko committed Aug 3, 2016
1 parent 0f03274 commit 5160dab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Samples/Catalog/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions Sources/Core/Common/ApplicationDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5160dab

Please sign in to comment.