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 |
#if !TARGET_OS_TV |
|
10 |
|
|
11 |
#import <Foundation/Foundation.h> |
|
12 |
|
|
13 |
#import <FBSDKCoreKit/FBSDKAppLinkResolving.h> |
|
14 |
|
|
15 |
NS_ASSUME_NONNULL_BEGIN |
|
16 |
|
|
17 |
/** |
|
18 |
Describes the callback for appLinkFromURLInBackground. |
|
19 |
@param appLinks the FBSDKAppLinks representing the deferred App Links |
|
20 |
@param error the error during the request, if any |
|
21 |
*/ |
|
22 |
typedef void (^ FBSDKAppLinksBlock)(NSDictionary<NSURL *, FBSDKAppLink *> *appLinks, |
|
23 |
NSError *_Nullable error) |
|
24 |
NS_SWIFT_NAME(AppLinksBlock); |
|
25 |
|
|
26 |
/** |
|
27 |
|
|
28 |
Provides an implementation of the FBSDKAppLinkResolving protocol that uses the Facebook App Link |
|
29 |
Index API to resolve App Links given a URL. It also provides an additional helper method that can resolve |
|
30 |
multiple App Links in a single call. |
|
31 |
|
|
32 |
Usage of this type requires a client token. See `[FBSDKSettings setClientToken:]` |
|
33 |
*/ |
|
34 |
|
|
35 |
NS_SWIFT_NAME(AppLinkResolver) |
|
36 |
@interface FBSDKAppLinkResolver : NSObject <FBSDKAppLinkResolving> |
|
37 |
|
|
38 |
- (instancetype)init NS_UNAVAILABLE; |
|
39 |
+ (instancetype)new NS_UNAVAILABLE; |
|
40 |
|
|
41 |
/** |
|
42 |
Asynchronously resolves App Link data for a given array of URLs. |
|
43 |
|
|
44 |
@param urls The URLs to resolve into an App Link. |
|
45 |
@param handler The completion block that will return an App Link for the given URL. |
|
46 |
*/ |
|
47 |
- (void)appLinksFromURLs:(NSArray<NSURL *> *)urls handler:(FBSDKAppLinksBlock)handler |
|
48 |
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension"); |
|
49 |
|
|
50 |
/** |
|
51 |
Allocates and initializes a new instance of FBSDKAppLinkResolver. |
|
52 |
*/ |
|
53 |
+ (instancetype)resolver |
|
54 |
NS_SWIFT_NAME(init()); |
|
55 |
|
|
56 |
@end |
|
57 |
|
|
58 |
NS_ASSUME_NONNULL_END |
|
59 |
|
|
60 |
#endif |