commit | author | age
|
2e29a3
|
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 "TargetConditionals.h" |
|
10 |
|
|
11 |
#if !TARGET_OS_TV |
|
12 |
|
|
13 |
#import <UIKit/UIKit.h> |
|
14 |
|
|
15 |
NS_ASSUME_NONNULL_BEGIN |
|
16 |
|
|
17 |
@class FBSDKReferralManagerResult; |
|
18 |
|
|
19 |
/** |
|
20 |
Describes the call back to the FBSDKReferralManager |
|
21 |
@param result the result of the referral |
|
22 |
@param error the referral error, if any. |
|
23 |
*/ |
|
24 |
typedef void (^ FBSDKReferralManagerResultBlock)(FBSDKReferralManagerResult *_Nullable result, |
|
25 |
NSError *_Nullable error) |
|
26 |
NS_SWIFT_NAME(ReferralManagerResultBlock); |
|
27 |
|
|
28 |
/** |
|
29 |
`FBSDKReferralManager` provides methods for starting the referral process. |
|
30 |
*/ |
|
31 |
NS_SWIFT_NAME(ReferralManager) |
|
32 |
DEPRECATED_MSG_ATTRIBUTE("`FBSDKReferralManager` is deprecated and will be removed in the next major release") |
|
33 |
@interface FBSDKReferralManager : NSObject |
|
34 |
|
|
35 |
/** |
|
36 |
Initialize a new instance with the provided view controller |
|
37 |
@param viewController the view controller to present from. If nil, the topmost view controller will be automatically determined as best as possible. |
|
38 |
*/ |
|
39 |
- (instancetype)initWithViewController:(nullable UIViewController *)viewController; |
|
40 |
|
|
41 |
/** |
|
42 |
Open the referral dialog. |
|
43 |
@param handler the callback. |
|
44 |
*/ |
|
45 |
- (void)startReferralWithCompletionHandler:(nullable FBSDKReferralManagerResultBlock)handler; |
|
46 |
|
|
47 |
@end |
|
48 |
|
|
49 |
NS_ASSUME_NONNULL_END |
|
50 |
|
|
51 |
#endif |