FBSDKAppLink.h 2.6 KB

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