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