FBSDKAppLinkResolving.h 1.2 KB

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