commit | author | age
|
bad748
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
W |
2 |
// |
|
3 |
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
|
4 |
// copy, modify, and distribute this software in source code or binary form for use |
|
5 |
// in connection with the web services and APIs provided by Facebook. |
|
6 |
// |
|
7 |
// As with any software that integrates with the Facebook platform, your use of |
|
8 |
// this software is subject to the Facebook Developer Principles and Policies |
|
9 |
// [http://developers.facebook.com/policy/]. This copyright notice shall be |
|
10 |
// included in all copies or substantial portions of the software. |
|
11 |
// |
|
12 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
14 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
15 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
16 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
17 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
18 |
|
|
19 |
#import <UIKit/UIKit.h> |
|
20 |
|
9febd9
|
21 |
/** |
bad748
|
22 |
|
9febd9
|
23 |
The FBSDKApplicationDelegate is designed to post process the results from Facebook Login |
bad748
|
24 |
or Facebook Dialogs (or any action that requires switching over to the native Facebook |
W |
25 |
app or Safari). |
|
26 |
|
9febd9
|
27 |
|
W |
28 |
|
bad748
|
29 |
The methods in this class are designed to mirror those in UIApplicationDelegate, and you |
W |
30 |
should call them in the respective methods in your AppDelegate implementation. |
|
31 |
*/ |
|
32 |
@interface FBSDKApplicationDelegate : NSObject |
|
33 |
|
9febd9
|
34 |
/** |
W |
35 |
Gets the singleton instance. |
bad748
|
36 |
*/ |
W |
37 |
+ (instancetype)sharedInstance; |
|
38 |
|
9febd9
|
39 |
/** |
W |
40 |
Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method |
bad748
|
41 |
of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction |
W |
42 |
with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. |
|
43 |
|
9febd9
|
44 |
- Parameter application: The application as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
45 |
|
9febd9
|
46 |
- Parameter url: The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
47 |
|
9febd9
|
48 |
- Parameter sourceApplication: The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
49 |
|
9febd9
|
50 |
- Parameter annotation: The annotation as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
51 |
|
9febd9
|
52 |
- Returns: YES if the url was intended for the Facebook SDK, NO if not. |
27832c
|
53 |
*/ |
bad748
|
54 |
- (BOOL)application:(UIApplication *)application |
W |
55 |
openURL:(NSURL *)url |
|
56 |
sourceApplication:(NSString *)sourceApplication |
|
57 |
annotation:(id)annotation; |
|
58 |
|
37c026
|
59 |
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_0 |
9febd9
|
60 |
/** |
W |
61 |
Call this method from the [UIApplicationDelegate application:openURL:options:] method |
|
62 |
of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction |
|
63 |
with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. |
|
64 |
|
|
65 |
- Parameter application: The application as passed to [UIApplicationDelegate application:openURL:options:]. |
|
66 |
|
|
67 |
- Parameter url: The URL as passed to [UIApplicationDelegate application:openURL:options:]. |
|
68 |
|
|
69 |
- Parameter options: The options dictionary as passed to [UIApplicationDelegate application:openURL:options:]. |
|
70 |
|
|
71 |
- Returns: YES if the url was intended for the Facebook SDK, NO if not. |
|
72 |
*/ |
|
73 |
- (BOOL)application:(UIApplication *)application |
|
74 |
openURL:(NSURL *)url |
|
75 |
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options; |
|
76 |
#endif |
|
77 |
|
|
78 |
/** |
|
79 |
Call this method from the [UIApplicationDelegate application:didFinishLaunchingWithOptions:] method |
bad748
|
80 |
of the AppDelegate for your app. It should be invoked for the proper use of the Facebook SDK. |
37c026
|
81 |
As part of SDK initialization basic auto logging of app events will occur, this can be |
H |
82 |
controlled via 'FacebookAutoLogAppEventsEnabled' key in the project info plist file. |
bad748
|
83 |
|
9febd9
|
84 |
- Parameter application: The application as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. |
bad748
|
85 |
|
9febd9
|
86 |
- Parameter launchOptions: The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. |
bad748
|
87 |
|
9febd9
|
88 |
- Returns: YES if the url was intended for the Facebook SDK, NO if not. |
bad748
|
89 |
*/ |
W |
90 |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; |
|
91 |
|
|
92 |
@end |