FBSDKURLOpening.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 <UIKit/UIKit.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. /**
  12. Internal Type exposed to facilitate transition to Swift.
  13. API Subject to change or removal without warning. Do not use.
  14. @warning INTERNAL - DO NOT USE
  15. */
  16. NS_SWIFT_NAME(URLOpening)
  17. @protocol FBSDKURLOpening <NSObject>
  18. // Implementations should make sure they can handle nil parameters
  19. // which is possible in SafariViewController.
  20. // see canOpenURL below.
  21. - (BOOL)application:(nullable UIApplication *)application
  22. openURL:(nullable NSURL *)url
  23. sourceApplication:(nullable NSString *)sourceApplication
  24. annotation:(nullable id)annotation;
  25. // create a different handler to return YES/NO if the receiver can process the above openURL:.
  26. // This is separated so that we can process the openURL: in callbacks, while still returning
  27. // the result of canOpenURL synchronously in FBSDKApplicationDelegate
  28. - (BOOL) canOpenURL:(NSURL *)url
  29. forApplication:(nullable UIApplication *)application
  30. sourceApplication:(nullable NSString *)sourceApplication
  31. annotation:(nullable id)annotation;
  32. - (void)applicationDidBecomeActive:(UIApplication *)application;
  33. - (BOOL)isAuthenticationURL:(NSURL *)url;
  34. @optional
  35. + (instancetype)makeOpener;
  36. - (BOOL)shouldStopPropagationOfURL:(NSURL *)url;
  37. @end
  38. NS_ASSUME_NONNULL_END
  39. #endif