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 |
|
e81c27
|
21 |
NS_ASSUME_NONNULL_BEGIN |
H |
22 |
|
9febd9
|
23 |
/** |
bad748
|
24 |
|
9febd9
|
25 |
The FBSDKApplicationDelegate is designed to post process the results from Facebook Login |
bad748
|
26 |
or Facebook Dialogs (or any action that requires switching over to the native Facebook |
W |
27 |
app or Safari). |
|
28 |
|
9febd9
|
29 |
|
W |
30 |
|
bad748
|
31 |
The methods in this class are designed to mirror those in UIApplicationDelegate, and you |
W |
32 |
should call them in the respective methods in your AppDelegate implementation. |
|
33 |
*/ |
e81c27
|
34 |
NS_SWIFT_NAME(ApplicationDelegate) |
bad748
|
35 |
@interface FBSDKApplicationDelegate : NSObject |
W |
36 |
|
e81c27
|
37 |
- (instancetype)init NS_UNAVAILABLE; |
H |
38 |
+ (instancetype)new NS_UNAVAILABLE; |
|
39 |
|
9febd9
|
40 |
/** |
e81c27
|
41 |
Gets the singleton instance. |
bad748
|
42 |
*/ |
e81c27
|
43 |
@property (class, nonatomic, readonly, strong) FBSDKApplicationDelegate *sharedInstance |
H |
44 |
NS_SWIFT_NAME(shared); |
bad748
|
45 |
|
9febd9
|
46 |
/** |
W |
47 |
Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method |
bad748
|
48 |
of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction |
W |
49 |
with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. |
|
50 |
|
13e53a
|
51 |
@param application The application as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
52 |
|
13e53a
|
53 |
@param url The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
54 |
|
13e53a
|
55 |
@param sourceApplication The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
56 |
|
13e53a
|
57 |
@param annotation The annotation as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
bad748
|
58 |
|
13e53a
|
59 |
@return YES if the url was intended for the Facebook SDK, NO if not. |
27832c
|
60 |
*/ |
bad748
|
61 |
- (BOOL)application:(UIApplication *)application |
W |
62 |
openURL:(NSURL *)url |
e81c27
|
63 |
sourceApplication:(nullable NSString *)sourceApplication |
H |
64 |
annotation:(nullable id)annotation; |
bad748
|
65 |
|
37c026
|
66 |
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_0 |
9febd9
|
67 |
/** |
W |
68 |
Call this method from the [UIApplicationDelegate application:openURL:options:] method |
|
69 |
of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction |
|
70 |
with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. |
|
71 |
|
13e53a
|
72 |
@param application The application as passed to [UIApplicationDelegate application:openURL:options:]. |
9febd9
|
73 |
|
13e53a
|
74 |
@param url The URL as passed to [UIApplicationDelegate application:openURL:options:]. |
9febd9
|
75 |
|
13e53a
|
76 |
@param options The options dictionary as passed to [UIApplicationDelegate application:openURL:options:]. |
9febd9
|
77 |
|
13e53a
|
78 |
@return YES if the url was intended for the Facebook SDK, NO if not. |
9febd9
|
79 |
*/ |
W |
80 |
- (BOOL)application:(UIApplication *)application |
|
81 |
openURL:(NSURL *)url |
e81c27
|
82 |
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options; |
9febd9
|
83 |
#endif |
W |
84 |
|
|
85 |
/** |
|
86 |
Call this method from the [UIApplicationDelegate application:didFinishLaunchingWithOptions:] method |
bad748
|
87 |
of the AppDelegate for your app. It should be invoked for the proper use of the Facebook SDK. |
37c026
|
88 |
As part of SDK initialization basic auto logging of app events will occur, this can be |
H |
89 |
controlled via 'FacebookAutoLogAppEventsEnabled' key in the project info plist file. |
bad748
|
90 |
|
13e53a
|
91 |
@param application The application as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. |
bad748
|
92 |
|
13e53a
|
93 |
@param launchOptions The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. |
bad748
|
94 |
|
13e53a
|
95 |
@return YES if the url was intended for the Facebook SDK, NO if not. |
bad748
|
96 |
*/ |
e81c27
|
97 |
- (BOOL)application:(UIApplication *)application |
H |
98 |
didFinishLaunchingWithOptions:(nullable NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions; |
|
99 |
|
|
100 |
/** |
|
101 |
Call this method to manually initialize SDK. |
|
102 |
|
|
103 |
@param launchOptions The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. |
|
104 |
Could be nil if you don't call this function from [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. |
|
105 |
*/ |
b19a78
|
106 |
+ (void)initializeSDK:(nullable NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions |
L |
107 |
DEPRECATED_MSG_ATTRIBUTE("This method is called automatically from `application:didFinishLaunchingWithOptions:`. Please use that method instead. This one will be removed in a future release."); |
bad748
|
108 |
|
W |
109 |
@end |
e81c27
|
110 |
|
H |
111 |
NS_ASSUME_NONNULL_END |