hank
2019-01-22 bf63695cd124ba0c3127f4cc8aa99c737729dd1d
commit | author | age
13e53a 1 // Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
H 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 #import "FBSDKAppLinkTarget.h"
22
23 NS_ASSUME_NONNULL_BEGIN
24
25 /*! The version of the App Link protocol that this library supports */
26 FOUNDATION_EXPORT NSString *const FBSDKAppLinkVersion;
27
28 /*!
29  Contains App Link metadata relevant for navigation on this device
30  derived from the HTML at a given URL.
31  */
32 @interface FBSDKAppLink : NSObject
33
34 /*!
35  Creates a FBSDKAppLink with the given list of FBSDKAppLinkTargets and target URL.
36
37  Generally, this will only be used by implementers of the FBSDKAppLinkResolving protocol,
38  as these implementers will produce App Link metadata for a given URL.
39
40  @param sourceURL the URL from which this App Link is derived
41  @param targets an ordered list of FBSDKAppLinkTargets for this platform derived
42  from App Link metadata.
43  @param webURL the fallback web URL, if any, for the app link.
44  */
45 + (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL
46                              targets:(NSArray<FBSDKAppLinkTarget *> *)targets
47                               webURL:(nullable NSURL *)webURL;
48
49 /*! The URL from which this FBSDKAppLink was derived */
50 @property (nonatomic, strong, readonly) NSURL *sourceURL;
51
52 /*!
53  The ordered list of targets applicable to this platform that will be used
54  for navigation.
55  */
56 @property (nonatomic, copy, readonly) NSArray<FBSDKAppLinkTarget *> *targets;
57
58 /*! The fallback web URL to use if no targets are installed on this device. */
59 @property (nonatomic, strong, readonly, nullable) NSURL *webURL;
60
61 @end
62
63 NS_ASSUME_NONNULL_END