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 <Foundation/Foundation.h> |
|
14 |
|
|
15 |
#import <FBSDKCoreKit/FBSDKCoreKit.h> |
|
16 |
#import <FBSDKShareKit/FBSDKSharingValidation.h> |
|
17 |
|
|
18 |
NS_ASSUME_NONNULL_BEGIN |
|
19 |
|
|
20 |
/** |
|
21 |
NS_ENUM(NSUInteger, FBSDKAppInviteDestination) |
|
22 |
Specifies the privacy of a group. |
|
23 |
*/ |
|
24 |
typedef NS_ENUM(NSUInteger, FBSDKAppInviteDestination) { |
|
25 |
/** Deliver to Facebook. */ |
|
26 |
FBSDKAppInviteDestinationFacebook = 0, |
|
27 |
/** Deliver to Messenger. */ |
|
28 |
FBSDKAppInviteDestinationMessenger, |
|
29 |
} NS_SWIFT_NAME(AppInviteDestination); |
|
30 |
|
|
31 |
/** |
|
32 |
A model for app invite. |
|
33 |
*/ |
|
34 |
NS_SWIFT_NAME(AppInviteContent) |
|
35 |
@interface FBSDKAppInviteContent : NSObject <NSCopying, NSObject, FBSDKSharingValidation, NSSecureCoding> |
|
36 |
|
|
37 |
- (instancetype)init DEPRECATED_MSG_ATTRIBUTE("`AppInviteContent.init` is deprecated and will be removed in the next major release. Please use `AppInviteContent(appLinkURL:) instead"); |
|
38 |
+ (instancetype)new DEPRECATED_MSG_ATTRIBUTE("`AppInviteContent.new` is deprecated and will be removed in the next major release. Please use `AppInviteContent(appLinkURL:) instead"); |
|
39 |
|
|
40 |
- (instancetype)initWithAppLinkURL:(NSURL *)appLinkURL; |
|
41 |
|
|
42 |
/** |
|
43 |
A URL to a preview image that will be displayed with the app invite |
|
44 |
|
|
45 |
|
|
46 |
This is optional. If you don't include it a fallback image will be used. |
|
47 |
*/ |
|
48 |
@property (nullable, nonatomic, copy) NSURL *appInvitePreviewImageURL; |
|
49 |
|
|
50 |
/** |
|
51 |
An app link target that will be used as a target when the user accept the invite. |
|
52 |
|
|
53 |
|
|
54 |
This is a requirement. |
|
55 |
*/ |
|
56 |
@property (nonatomic, copy) NSURL *appLinkURL; |
|
57 |
|
|
58 |
/** |
|
59 |
Promotional code to be displayed while sending and receiving the invite. |
|
60 |
|
|
61 |
|
|
62 |
This is optional. This can be between 0 and 10 characters long and can contain |
|
63 |
alphanumeric characters only. To set a promo code, you need to set promo text. |
|
64 |
*/ |
|
65 |
@property (nullable, nonatomic, copy) NSString *promotionCode; |
|
66 |
|
|
67 |
/** |
|
68 |
Promotional text to be displayed while sending and receiving the invite. |
|
69 |
|
|
70 |
|
|
71 |
This is optional. This can be between 0 and 80 characters long and can contain |
|
72 |
alphanumeric and spaces only. |
|
73 |
*/ |
|
74 |
@property (nullable, nonatomic, copy) NSString *promotionText; |
|
75 |
|
|
76 |
/** |
|
77 |
Destination for the app invite. |
|
78 |
|
|
79 |
|
|
80 |
This is optional and for declaring destination of the invite. |
|
81 |
*/ |
|
82 |
@property (nonatomic, assign) FBSDKAppInviteDestination destination; |
|
83 |
|
|
84 |
/** |
|
85 |
Compares the receiver to another app invite content. |
|
86 |
@param content The other content |
|
87 |
@return YES if the receiver's values are equal to the other content's values; otherwise NO |
|
88 |
*/ |
|
89 |
- (BOOL)isEqualToAppInviteContent:(FBSDKAppInviteContent *)content; |
|
90 |
|
|
91 |
@end |
|
92 |
|
|
93 |
NS_ASSUME_NONNULL_END |
|
94 |
|
|
95 |
#endif |