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