GEConfig.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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
  45. DEPRECATED_MSG_ATTRIBUTE("Please config TAConfigInfo in main info.plist");
  46. /**
  47. Data cache expiration time, the default is 10 days, the longest is 10 days
  48. */
  49. @property(class, nonatomic) NSInteger expirationDays
  50. DEPRECATED_MSG_ATTRIBUTE("Please config TAConfigInfo in main info.plist");
  51. /**
  52. appid
  53. */
  54. @property(atomic, copy) NSString *appid;
  55. /**
  56. instance Token
  57. */
  58. @property(atomic, copy) NSString *(^getInstanceName)(void);
  59. /**
  60. Server URL
  61. */
  62. @property(atomic, copy) NSString *configureURL;
  63. /**
  64. Gravity AccessToken
  65. */
  66. @property(nonatomic, copy) NSString *accessToken;
  67. /**
  68. Initialize and configure background self-starting events
  69. YES: Collect background self-starting events
  70. NO: Do not collect background self-starting events
  71. */
  72. @property(nonatomic, assign) BOOL trackRelaunchedInBackgroundEvents;
  73. /**
  74. Debug Mode
  75. */
  76. @property(nonatomic, assign) GravityEngineDebugMode debugMode;
  77. /**
  78. app launchOptions
  79. */
  80. @property(nonatomic, copy) NSDictionary *launchOptions;
  81. /**
  82. Initialize and configure the certificate verification policy
  83. */
  84. @property(nonatomic, strong) GESecurityPolicy *securityPolicy;
  85. /**
  86. Set default time zone
  87. You can use this time zone to compare the offset of the current time zone and the default time zone
  88. */
  89. @property(nonatomic, strong) NSTimeZone *defaultTimeZone;
  90. /**
  91. instance name
  92. */
  93. @property(nonatomic, copy) NSString *name;
  94. + (GEConfig *)defaultGEConfig;
  95. - (void)setNetworkType:(GravityEngineNetworkType)type;
  96. /// enable encryption
  97. @property(nonatomic, assign) BOOL enableEncrypt;
  98. #if TARGET_OS_IOS
  99. /// Get local key configuration
  100. @property (nonatomic, strong) GESecretKey *secretKey;
  101. #endif
  102. /// instance token
  103. - (NSString *)getMapInstanceToken;
  104. @end
  105. NS_ASSUME_NONNULL_END