FBSDKServerConfiguration.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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/FBSDKDialogConfiguration.h>
  9. #import <FBSDKCoreKit/FBSDKErrorConfiguration.h>
  10. #import <Foundation/Foundation.h>
  11. NS_ASSUME_NONNULL_BEGIN
  12. // MARK: LoginKit
  13. /**
  14. Internal value 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. FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameLogin;
  19. // MARK: ShareKit
  20. /**
  21. Internal value exposed to facilitate transition to Swift.
  22. API Subject to change or removal without warning. Do not use.
  23. @warning INTERNAL - DO NOT USE
  24. */
  25. FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameAppInvite;
  26. /**
  27. Internal value exposed to facilitate transition to Swift.
  28. API Subject to change or removal without warning. Do not use.
  29. @warning INTERNAL - DO NOT USE
  30. */
  31. FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameGameRequest;
  32. /**
  33. Internal value exposed to facilitate transition to Swift.
  34. API Subject to change or removal without warning. Do not use.
  35. @warning INTERNAL - DO NOT USE
  36. */
  37. FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameGroup;
  38. // MARK: -
  39. /**
  40. Internal value exposed to facilitate transition to Swift.
  41. API Subject to change or removal without warning. Do not use.
  42. @warning INTERNAL - DO NOT USE
  43. */
  44. FOUNDATION_EXPORT const NSInteger FBSDKServerConfigurationVersion;
  45. /**
  46. Internal type exposed to facilitate transition to Swift.
  47. API Subject to change or removal without warning. Do not use.
  48. @warning INTERNAL - DO NOT USE
  49. */
  50. typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationSmartLoginOptions) {
  51. FBSDKServerConfigurationSmartLoginOptionsUnknown = 0,
  52. FBSDKServerConfigurationSmartLoginOptionsEnabled = 1 << 0,
  53. FBSDKServerConfigurationSmartLoginOptionsRequireConfirmation = 1 << 1,
  54. };
  55. /**
  56. Internal type exposed to facilitate transition to Swift.
  57. API Subject to change or removal without warning. Do not use.
  58. @warning INTERNAL - DO NOT USE
  59. */
  60. NS_SWIFT_NAME(_ServerConfiguration)
  61. @interface FBSDKServerConfiguration : NSObject <NSCopying, NSObject, NSSecureCoding>
  62. - (instancetype)init NS_UNAVAILABLE;
  63. + (instancetype)new NS_UNAVAILABLE;
  64. - (instancetype) initWithAppID:(NSString *)appID
  65. appName:(nullable NSString *)appName
  66. loginTooltipEnabled:(BOOL)loginTooltipEnabled
  67. loginTooltipText:(nullable NSString *)loginTooltipText
  68. defaultShareMode:(nullable NSString *)defaultShareMode
  69. advertisingIDEnabled:(BOOL)advertisingIDEnabled
  70. implicitLoggingEnabled:(BOOL)implicitLoggingEnabled
  71. implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
  72. codelessEventsEnabled:(BOOL)codelessEventsEnabled
  73. uninstallTrackingEnabled:(BOOL)uninstallTrackingEnabled
  74. dialogConfigurations:(nullable NSDictionary<NSString *, id> *)dialogConfigurations
  75. dialogFlows:(nullable NSDictionary<NSString *, id> *)dialogFlows
  76. timestamp:(nullable NSDate *)timestamp
  77. errorConfiguration:(nullable FBSDKErrorConfiguration *)errorConfiguration
  78. sessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval
  79. defaults:(BOOL)defaults
  80. loggingToken:(nullable NSString *)loggingToken
  81. smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions
  82. smartLoginBookmarkIconURL:(nullable NSURL *)smartLoginBookmarkIconURL
  83. smartLoginMenuIconURL:(nullable NSURL *)smartLoginMenuIconURL
  84. updateMessage:(nullable NSString *)updateMessage
  85. eventBindings:(nullable NSArray<NSDictionary<NSString *, id> *> *)eventBindings
  86. restrictiveParams:(nullable NSDictionary<NSString *, id> *)restrictiveParams
  87. AAMRules:(nullable NSDictionary<NSString *, id> *)AAMRules
  88. suggestedEventsSetting:(nullable NSDictionary<NSString *, id> *)suggestedEventsSetting
  89. protectedModeRules:(nullable NSDictionary<NSString *, id> *)protectedModeRules
  90. migratedAutoLogValues:(nullable NSDictionary<NSString *, id> *)migratedAutoLogValues
  91. NS_DESIGNATED_INITIALIZER;
  92. @property (nonatomic, readonly, getter = isAdvertisingIDEnabled, assign) BOOL advertisingIDEnabled;
  93. @property (nonatomic, readonly, copy) NSString *appID;
  94. @property (nullable, nonatomic, readonly, copy) NSString *appName;
  95. @property (nonatomic, readonly, getter = isDefaults, assign) BOOL defaults;
  96. @property (nullable, nonatomic, readonly, copy) NSString *defaultShareMode;
  97. @property (nullable, nonatomic, readonly, strong) FBSDKErrorConfiguration *errorConfiguration;
  98. @property (nonatomic, readonly, getter = isImplicitLoggingSupported, assign) BOOL implicitLoggingEnabled;
  99. @property (nonatomic, readonly, getter = isImplicitPurchaseLoggingSupported, assign) BOOL implicitPurchaseLoggingEnabled;
  100. @property (nonatomic, readonly, getter = isCodelessEventsEnabled, assign) BOOL codelessEventsEnabled;
  101. @property (nonatomic, readonly, getter = isLoginTooltipEnabled, assign) BOOL loginTooltipEnabled;
  102. @property (nonatomic, readonly, getter = isUninstallTrackingEnabled, assign) BOOL uninstallTrackingEnabled;
  103. @property (nullable, nonatomic, readonly, copy) NSString *loginTooltipText;
  104. @property (nullable, nonatomic, readonly, copy) NSDate *timestamp;
  105. @property (nonatomic, assign) NSTimeInterval sessionTimeoutInterval;
  106. @property (nullable, nonatomic, readonly, copy) NSString *loggingToken;
  107. @property (nonatomic, readonly, assign) FBSDKServerConfigurationSmartLoginOptions smartLoginOptions;
  108. @property (nullable, nonatomic, readonly, copy) NSURL *smartLoginBookmarkIconURL;
  109. @property (nullable, nonatomic, readonly, copy) NSURL *smartLoginMenuIconURL;
  110. @property (nullable, nonatomic, readonly, copy) NSString *updateMessage;
  111. @property (nullable, nonatomic, readonly, copy) NSArray<NSDictionary<NSString *, id> *> *eventBindings;
  112. @property (nullable, nonatomic, readonly, copy) NSDictionary<NSString *, id> *restrictiveParams;
  113. @property (nullable, nonatomic, readonly, copy) NSDictionary<NSString *, id> *AAMRules;
  114. @property (nullable, nonatomic, readonly, copy) NSDictionary<NSString *, id> *suggestedEventsSetting;
  115. @property (nullable, nonatomic, readonly, copy) NSDictionary<NSString *, id> *protectedModeRules;
  116. @property (nullable, nonatomic, readonly, copy) NSDictionary<NSString *, id> *migratedAutoLogValues;
  117. @property (nonatomic, readonly) NSInteger version;
  118. - (nullable FBSDKDialogConfiguration *)dialogConfigurationForDialogName:(NSString *)dialogName;
  119. - (BOOL)useNativeDialogForDialogName:(NSString *)dialogName;
  120. - (BOOL)useSafariViewControllerForDialogName:(NSString *)dialogName;
  121. @end
  122. NS_ASSUME_NONNULL_END