FBSDKDomainHandler.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 <Foundation/Foundation.h>
  9. #import <FBSDKCoreKit/FBSDKDomainConfigurationProviding.h>
  10. #import <FBSDKCoreKit/FBSDKGraphRequest.h>
  11. #import <FBSDKCoreKit/FBSDKGraphRequestMetadata.h>
  12. NS_ASSUME_NONNULL_BEGIN
  13. /**
  14. Internal type exposed to facilitate transition to Swift.
  15. API Subject to change or removal without warning. Do not use.
  16. @warning INTERNAL - DO NOT USE
  17. */
  18. NS_SWIFT_NAME(_DomainHandler)
  19. @interface FBSDKDomainHandler : NSObject
  20. + (instancetype)sharedInstance;
  21. + (instancetype)new NS_UNAVAILABLE;
  22. - (instancetype)init NS_UNAVAILABLE;
  23. - (void)configureWithGraphRequestFactory:(id<FBSDKDomainConfigurationProviding>)domainConfigurationProvider
  24. settings:(id<FBSDKSettings>)settings
  25. dataStore:(id<FBSDKDataPersisting>)dataStore
  26. graphRequestFactory:(id<FBSDKGraphRequestFactory>)graphRequestFactory
  27. graphRequestConnectionFactory:(id<FBSDKGraphRequestConnectionFactory>)graphRequestConnectionFactory
  28. NS_SWIFT_NAME(configure(domainConfigurationProvider:settings:dataStore:graphRequestFactory:graphRequestConnectionFactory:));
  29. - (void)loadDomainConfigurationWithCompletionBlock:(nullable FBSDKDomainConfigurationBlock)completionBlock;
  30. /**
  31. Internal method exposed to facilitate transition to Swift.
  32. API Subject to change or removal without warning. Do not use.
  33. @warning INTERNAL - DO NOT USE
  34. */
  35. - (NSString *)getURLPrefixForSingleRequest:(id<FBSDKGraphRequest>)request
  36. isAdvertiserTrackingEnabled:(BOOL)isATTOptIn;
  37. /**
  38. Internal method exposed to facilitate transition to Swift.
  39. API Subject to change or removal without warning. Do not use.
  40. @warning INTERNAL - DO NOT USE
  41. */
  42. - (NSString *)getURLPrefixForBatchRequest:(NSArray<FBSDKGraphRequestMetadata *> *)requestsMetaData
  43. isAdvertiserTrackingEnabled:(BOOL)isATTOptIn;
  44. /**
  45. @method
  46. This method determines if the current authentication token is for the gaming domain
  47. @return a BOOL indicating if the current authentication token is for the gaming domain
  48. */
  49. + (BOOL)isAuthenticatedForGamingDomain;
  50. + (NSString *)getCleanedGraphPathFromRequest:(id<FBSDKGraphRequest>)request;
  51. - (nullable NSString *)getATTScopeEndpointForGraphPath:(NSString *)graphPath;
  52. - (BOOL)isDomainHandlingEnabled;
  53. @end
  54. NS_ASSUME_NONNULL_END