KMRecommondInfo.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //
  2. // KMRecommondInfo.h
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by Niehaoyu on 2023/4/11.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. typedef enum : NSUInteger {
  10. KMRecommondShowType_None,
  11. KMRecommondShowType_All,//免费版跟付费版都需要显示
  12. KMRecommondShowType_Pro,//只有付费用户显示
  13. KMRecommondShowType_Lite,//只有免费用户显示
  14. } KMRecommondShowType;
  15. @class KMRecommondInfo;
  16. @interface KMRecommond : NSObject
  17. - (id)initWithDict:(NSDictionary *)dict;
  18. @property (nonatomic, strong) NSString *versionKey;
  19. @property (nonatomic, strong) NSString *name;
  20. @property (nonatomic, strong, readonly) NSMutableArray <KMRecommondInfo *> *recommondInfoArrM;
  21. @end
  22. @interface KMRecommondInfo : NSObject
  23. + (NSString *)languageKey;
  24. + (NSString *)cacheDirs;
  25. + (BOOL)isDarkMode;
  26. - (id)initWithDict:(NSDictionary *)dict;
  27. - (void)updateValue:(NSString *)value forKey:(NSString *)key;
  28. @property (nonatomic, assign) BOOL show;//是否显示,内部有做了时间区间判断
  29. @property (nonatomic, assign) KMRecommondShowType showType;
  30. @property (nonatomic, strong) NSDate *startDate;
  31. @property (nonatomic, strong) NSDate *endDate;
  32. @property (nonatomic, strong) NSString *versionKey;//版本号,唯一标识符
  33. @property (nonatomic, assign) BOOL showCloseBtn;//是否显示关闭按钮,(左下角广告需要)
  34. @property (nonatomic, strong) NSImage *normalImage;//APP互推,常规状态下的图片
  35. @property (nonatomic, strong) NSImage *hoverImage;//APP互推悬浮状态下的图片
  36. @property (nonatomic, strong) NSImage *iconImage;//广告显示图片(自适应多语)
  37. @property (nonatomic, strong) NSString *title;//名称(自适应多语)
  38. @property (nonatomic, strong) NSString *tooltips;//提示语(自适应多语)
  39. @property (nonatomic, strong) NSString *linkURL;//跳转链接(自适应多语)
  40. //Firebase
  41. @property (nonatomic, strong) NSString *firebaseEvent;//
  42. @property (nonatomic, strong) NSString *firebasePropertyKey;//
  43. @property (nonatomic, strong) NSString *firebasePropertyValue;//
  44. @end
  45. NS_ASSUME_NONNULL_END