ALCMessage.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // ALCMessage.h
  3. // AppLovinSDK
  4. //
  5. // Created by Thomas So on 7/4/19.
  6. //
  7. #import <AppLovinSDK/ALCPublisher.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. /**
  10. * Class representing messages passed in the Communicator SDK.
  11. */
  12. @interface ALCMessage : NSNotification
  13. /**
  14. * The unique id of the message.
  15. */
  16. @property (nonatomic, copy, readonly) NSString *uniqueIdentifier;
  17. /**
  18. * The topic of the message. A full list of supported topics may be found in ALCTopic.h.
  19. */
  20. @property (nonatomic, copy, readonly) NSString *topic;
  21. /**
  22. * The id of the publisher of the message.
  23. */
  24. @property (nonatomic, copy, readonly) NSString *publisherIdentifier;
  25. /**
  26. * The raw data of the message.
  27. */
  28. @property (nonatomic, copy, readonly) NSDictionary<NSString *, id> *data;
  29. /**
  30. * Initialize a message with data in a pre-determined format for a given topic.
  31. */
  32. - (instancetype)initWithData:(NSDictionary<NSString *, id> *)data topic:(NSString *)topic fromPublisher:(id<ALCPublisher>)publisher;
  33. - (instancetype)initWithName:(NSNotificationName)name object:(nullable id)object userInfo:(nullable NSDictionary *)userInfo NS_UNAVAILABLE;
  34. - (instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
  35. - (instancetype)init NS_UNAVAILABLE;
  36. + (instancetype)new NS_UNAVAILABLE;
  37. @end
  38. NS_ASSUME_NONNULL_END