FBSDKSwizzler.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #import <FBSDKCoreKit/FBSDKSwizzling.h>
  9. #import <Foundation/Foundation.h>
  10. // Cast to turn things that are not ids into NSMapTable keys
  11. #define MAPTABLE_ID(x) (__bridge id)((void *)x)
  12. #pragma clang diagnostic push
  13. #pragma clang diagnostic ignored "-Wstrict-prototypes"
  14. /**
  15. Internal type exposed to facilitate transition to Swift.
  16. API Subject to change or removal without warning. Do not use.
  17. @warning INTERNAL - DO NOT USE
  18. */
  19. typedef void (^_swizzleBlock)();
  20. #pragma clang diagnostic pop
  21. NS_ASSUME_NONNULL_BEGIN
  22. /**
  23. Internal type exposed to facilitate transition to Swift.
  24. API Subject to change or removal without warning. Do not use.
  25. @warning INTERNAL - DO NOT USE
  26. */
  27. NS_SWIFT_NAME(_Swizzler)
  28. @interface FBSDKSwizzler : NSObject <FBSDKSwizzling>
  29. + (void)swizzleSelector:(SEL)aSelector onClass:(Class)aClass withBlock:(_swizzleBlock)block named:(NSString *)aName;
  30. + (void)unswizzleSelector:(SEL)aSelector onClass:(Class)aClass named:(NSString *)aName;
  31. + (void)printSwizzles;
  32. @end
  33. NS_ASSUME_NONNULL_END