BFAppLink.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2014, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. #import <Foundation/Foundation.h>
  11. /*! The version of the App Link protocol that this library supports */
  12. FOUNDATION_EXPORT NSString *const BFAppLinkVersion;
  13. /*!
  14. Contains App Link metadata relevant for navigation on this device
  15. derived from the HTML at a given URL.
  16. */
  17. @interface BFAppLink : NSObject
  18. /*!
  19. Creates a BFAppLink with the given list of BFAppLinkTargets and target URL.
  20. Generally, this will only be used by implementers of the BFAppLinkResolving protocol,
  21. as these implementers will produce App Link metadata for a given URL.
  22. @param sourceURL the URL from which this App Link is derived
  23. @param targets an ordered list of BFAppLinkTargets for this platform derived
  24. from App Link metadata.
  25. @param webURL the fallback web URL, if any, for the app link.
  26. */
  27. + (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL
  28. targets:(NSArray *)targets
  29. webURL:(NSURL *)webURL;
  30. /*! The URL from which this BFAppLink was derived */
  31. @property (nonatomic, strong, readonly) NSURL *sourceURL;
  32. /*!
  33. The ordered list of targets applicable to this platform that will be used
  34. for navigation.
  35. */
  36. @property (nonatomic, copy, readonly) NSArray *targets;
  37. /*! The fallback web URL to use if no targets are installed on this device. */
  38. @property (nonatomic, strong, readonly) NSURL *webURL;
  39. @end