GEConfig.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #import <Foundation/Foundation.h>
  2. #if __has_include(<GravityEngineSDK/GEConstant.h>)
  3. #import <GravityEngineSDK/GEConstant.h>
  4. #else
  5. #import "GEConstant.h"
  6. #endif
  7. #if __has_include(<GravityEngineSDK/GESecurityPolicy.h>)
  8. #import <GravityEngineSDK/GESecurityPolicy.h>
  9. #else
  10. #import "GESecurityPolicy.h"
  11. #endif
  12. #if TARGET_OS_IOS
  13. #if __has_include(<GravityEngineSDK/GESecretKey.h>)
  14. #import <GravityEngineSDK/GESecretKey.h>
  15. #else
  16. #import "GESecretKey.h"
  17. #endif
  18. #endif
  19. NS_ASSUME_NONNULL_BEGIN
  20. @interface GEConfig:NSObject <NSCopying>
  21. /**
  22. Set automatic burying type
  23. */
  24. @property (assign, nonatomic) GravityEngineAutoTrackEventType autoTrackEventType;
  25. /**
  26. Network environment for data transmission
  27. */
  28. @property (assign, nonatomic) GravityNetworkType networkTypePolicy;
  29. /**
  30. Data upload interval
  31. */
  32. @property (nonatomic, strong) NSNumber *uploadInterval;
  33. /**
  34. When there is data to upload, when the number of data cache reaches the uploadsize, upload the data immediately
  35. */
  36. @property (nonatomic, strong) NSNumber *uploadSize;
  37. /**
  38. Event blacklist, event names that are not counted are added here
  39. */
  40. @property (strong, nonatomic) NSArray *disableEvents;
  41. /**
  42. The maximum number of cached events, the default is 10000, the minimum is 5000
  43. */
  44. @property (class, nonatomic) NSInteger maxNumEvents DEPRECATED_MSG_ATTRIBUTE("Please config TAConfigInfo in main info.plist");
  45. /**
  46. Data cache expiration time, the default is 10 days, the longest is 10 days
  47. */
  48. @property (class, nonatomic) NSInteger expirationDays DEPRECATED_MSG_ATTRIBUTE("Please config TAConfigInfo in main info.plist");
  49. /**
  50. appid
  51. */
  52. @property (atomic, copy) NSString *appid;
  53. /**
  54. instance Token
  55. */
  56. @property (atomic, copy) NSString *(^getInstanceName)(void);
  57. /**
  58. Server URL
  59. */
  60. @property (atomic, copy) NSString *configureURL;
  61. /**
  62. Gravity AccessToken
  63. */
  64. @property (nonatomic, copy) NSString *accessToken;
  65. /**
  66. Initialize and configure background self-starting events
  67. YES: Collect background self-starting events
  68. NO: Do not collect background self-starting events
  69. */
  70. @property (nonatomic, assign) BOOL trackRelaunchedInBackgroundEvents;
  71. /**
  72. Debug Mode
  73. */
  74. @property (nonatomic, assign) GravityEngineDebugMode debugMode;
  75. /**
  76. app launchOptions
  77. */
  78. @property (nonatomic, copy) NSDictionary *launchOptions;
  79. /**
  80. Initialize and configure the certificate verification policy
  81. */
  82. @property (nonatomic, strong) GESecurityPolicy *securityPolicy;
  83. /**
  84. Set default time zone
  85. You can use this time zone to compare the offset of the current time zone and the default time zone
  86. */
  87. @property (nonatomic, strong) NSTimeZone *defaultTimeZone;
  88. /**
  89. instance name
  90. */
  91. @property (nonatomic, copy) NSString *name;
  92. + (GEConfig *)defaultGEConfig;
  93. - (void)setNetworkType:(GravityEngineNetworkType)type;
  94. /// enable encryption
  95. @property (nonatomic, assign) BOOL enableEncrypt;
  96. #if TARGET_OS_IOS
  97. /// Get local key configuration
  98. @property (nonatomic, strong) GESecretKey *secretKey;
  99. #endif
  100. /// instance token
  101. - (NSString *)getMapInstanceToken;
  102. @end
  103. NS_ASSUME_NONNULL_END