commit | author | age
|
e0ec42
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <FBSDKCoreKit/FBSDKGateKeeperManaging.h> |
|
10 |
|
|
11 |
#import <Foundation/Foundation.h> |
|
12 |
|
|
13 |
#define FBSDK_GATEKEEPER_MANAGER_CACHE_TIMEOUT (60 * 60) |
|
14 |
|
|
15 |
NS_ASSUME_NONNULL_BEGIN |
|
16 |
|
|
17 |
@protocol FBSDKSettings; |
|
18 |
@protocol FBSDKGraphRequestFactory; |
|
19 |
@protocol FBSDKGraphRequestConnectionFactory; |
|
20 |
@protocol FBSDKDataPersisting; |
|
21 |
|
|
22 |
/** |
|
23 |
Internal Type exposed to facilitate transition to Swift. |
|
24 |
API Subject to change or removal without warning. Do not use. |
|
25 |
|
|
26 |
@warning INTERNAL - DO NOT USE |
|
27 |
*/ |
|
28 |
typedef NSString *const FBSDKGateKeeperKey NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(_GateKeeperManager.GateKeeperKey); |
|
29 |
typedef void (^ FBSDKGKManagerBlock)(NSError *_Nullable error) |
|
30 |
NS_SWIFT_NAME(_GKManagerBlock); |
|
31 |
|
|
32 |
/** |
|
33 |
Internal Type exposed to facilitate transition to Swift. |
|
34 |
API Subject to change or removal without warning. Do not use. |
|
35 |
|
|
36 |
@warning INTERNAL - DO NOT USE |
|
37 |
*/ |
|
38 |
NS_SWIFT_NAME(_GateKeeperManager) |
|
39 |
@interface FBSDKGateKeeperManager : NSObject <FBSDKGateKeeperManaging> |
|
40 |
|
|
41 |
- (instancetype)init NS_UNAVAILABLE; |
|
42 |
+ (instancetype)new NS_UNAVAILABLE; |
|
43 |
|
|
44 |
+ (void) configureWithSettings:(id<FBSDKSettings>)settings |
|
45 |
graphRequestFactory:(id<FBSDKGraphRequestFactory>)graphRequestFactory |
|
46 |
graphRequestConnectionFactory:(id<FBSDKGraphRequestConnectionFactory>)graphRequestConnectionFactory |
|
47 |
store:(id<FBSDKDataPersisting>)store |
|
48 |
NS_SWIFT_NAME(configure(settings:graphRequestFactory:graphRequestConnectionFactory:store:)); |
|
49 |
|
|
50 |
/// Returns the locally cached configuration. |
|
51 |
+ (BOOL)boolForKey:(NSString *)key defaultValue:(BOOL)defaultValue; |
|
52 |
|
|
53 |
/** |
|
54 |
Load the gate keeper configurations from server |
|
55 |
|
|
56 |
WARNING: Must call `configure` before loading gate keepers. |
|
57 |
*/ |
|
58 |
+ (void)loadGateKeepers:(nullable FBSDKGKManagerBlock)completionBlock; |
|
59 |
|
|
60 |
@end |
|
61 |
|
|
62 |
NS_ASSUME_NONNULL_END |