FBSDKAppEventsState.h 1.7 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/FBSDKEventsProcessing.h>
  9. #import <Foundation/Foundation.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. // this type is not thread safe.
  17. NS_SWIFT_NAME(_AppEventsState)
  18. @interface FBSDKAppEventsState : NSObject <NSCopying, NSSecureCoding>
  19. @property (class, nullable, nonatomic) NSArray<id<FBSDKEventsProcessing>> *eventProcessors;
  20. @property (nonatomic, readonly, copy) NSArray<NSDictionary<NSString *, id> *> *events;
  21. @property (nonatomic, readonly, assign) NSUInteger numSkipped;
  22. @property (nonatomic, readonly, copy) NSString *tokenString;
  23. @property (nonatomic, readonly, copy) NSString *appID;
  24. @property (nonatomic, readonly, getter = areAllEventsImplicit) BOOL allEventsImplicit;
  25. - (instancetype)init NS_UNAVAILABLE;
  26. + (instancetype)new NS_UNAVAILABLE;
  27. - (instancetype)initWithToken:(nullable NSString *)tokenString appID:(nullable NSString *)appID NS_DESIGNATED_INITIALIZER;
  28. - (void)addEvent:(NSDictionary<NSString *, id> *)eventDictionary isImplicit:(BOOL)isImplicit;
  29. - (void)addEventsFromAppEventState:(FBSDKAppEventsState *)appEventsState;
  30. - (BOOL)isCompatibleWithAppEventsState:(nullable FBSDKAppEventsState *)appEventsState;
  31. - (BOOL)isCompatibleWithTokenString:(NSString *)tokenString appID:(NSString *)appID;
  32. - (NSString *)JSONStringForEventsIncludingImplicitEvents:(BOOL)includeImplicitEvents;
  33. - (NSString *)extractReceiptData;
  34. @end
  35. NS_ASSUME_NONNULL_END