lpw
2022-02-15 2e29a3a585524a054640bb6e7bdf26fe77ba1f17
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 NS_ASSUME_NONNULL_BEGIN
14
15 @class FBSDKAppLink;
16
17 /**
18  Describes the callback for appLinkFromURLInBackground.
19  @param appLink the FBSDKAppLink representing the deferred App Link
20  @param error the error during the request, if any
21
22  */
23 typedef void (^ FBSDKAppLinkBlock)(FBSDKAppLink *_Nullable appLink, NSError *_Nullable error)
24 NS_SWIFT_NAME(AppLinkBlock);
25
26 /**
27  Implement this protocol to provide an alternate strategy for resolving
28  App Links that may include pre-fetching, caching, or querying for App Link
29  data from an index provided by a service provider.
30  */
31 NS_SWIFT_NAME(AppLinkResolving)
32 @protocol FBSDKAppLinkResolving <NSObject>
33
34 /**
35  Asynchronously resolves App Link data for a given URL.
36
37  @param url The URL to resolve into an App Link.
38  @param handler The completion block that will return an App Link for the given URL.
39  */
40 - (void)appLinkFromURL:(NSURL *)url handler:(FBSDKAppLinkBlock)handler
41     NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension");
42
43 @end
44
45 NS_ASSUME_NONNULL_END
46
47 #endif