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 |
|
|
21 |
@class BFTask; |
|
22 |
|
|
23 |
// Check if Bolts.framework is available for import |
|
24 |
#if __has_include(<Bolts/BFAppLinkResolving.h>) |
|
25 |
// Import it if it's available |
|
26 |
# import <Bolts/BFAppLinkResolving.h> |
|
27 |
#else |
|
28 |
// Otherwise - redeclare BFAppLinkResolving protocol to resolve the problem of missing symbols |
|
29 |
// Please note: Bolts.framework is still required for AppLink resolving to work, |
|
30 |
// but this allows FBSDKCoreKit to weakly link Bolts.framework as well as this enables clang modulemaps to work. |
|
31 |
|
|
32 |
/*! |
|
33 |
Implement this protocol to provide an alternate strategy for resolving |
|
34 |
App Links that may include pre-fetching, caching, or querying for App Link |
|
35 |
data from an index provided by a service provider. |
|
36 |
*/ |
|
37 |
@protocol BFAppLinkResolving <NSObject> |
|
38 |
|
|
39 |
/*! |
|
40 |
Asynchronously resolves App Link data for a given URL. |
|
41 |
|
|
42 |
@param url The URL to resolve into an App Link. |
|
43 |
@returns A BFTask that will return a BFAppLink for the given URL. |
|
44 |
*/ |
|
45 |
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url; |
|
46 |
|
|
47 |
@end |
|
48 |
|
|
49 |
#endif |
|
50 |
|
|
51 |
/*! |
|
52 |
@class FBSDKAppLinkResolver |
|
53 |
|
|
54 |
@abstract |
|
55 |
Provides an implementation of the BFAppLinkResolving protocol that uses the Facebook App Link |
|
56 |
Index API to resolve App Links given a URL. It also provides an additional helper method that can resolve |
|
57 |
multiple App Links in a single call. |
|
58 |
|
|
59 |
@discussion |
|
60 |
Usage of this type requires a client token. See `[FBSDKSettings setClientToken:]` and linking |
|
61 |
Bolts.framework |
|
62 |
*/ |
|
63 |
@interface FBSDKAppLinkResolver : NSObject<BFAppLinkResolving> |
|
64 |
|
|
65 |
/*! |
|
66 |
@abstract Asynchronously resolves App Link data for multiple URLs. |
|
67 |
|
|
68 |
@param urls An array of NSURLs to resolve into App Links. |
|
69 |
@returns A BFTask that will return dictionary mapping input NSURLs to their |
|
70 |
corresponding BFAppLink. |
|
71 |
|
|
72 |
@discussion |
|
73 |
You should set the client token before making this call. See `[FBSDKSettings setClientToken:]` |
|
74 |
*/ |
|
75 |
- (BFTask *)appLinksFromURLsInBackground:(NSArray *)urls; |
|
76 |
|
|
77 |
/*! |
|
78 |
@abstract Allocates and initializes a new instance of FBSDKAppLinkResolver. |
|
79 |
*/ |
|
80 |
+ (instancetype)resolver; |
|
81 |
|
|
82 |
@end |