PrefixHeader.pch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. //
  2. // PrefixHeader.pch
  3. // Private-X
  4. //
  5. // Created by 余衡武 on 2021/12/8.
  6. //
  7. #ifndef PrefixHeader_pch
  8. #define PrefixHeader_pch
  9. #ifdef DEBUG // 调试状态, 打开LOG功能
  10. #define KyoLog(fmt, ...) NSLog((@"%s [LinE %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
  11. #define KyoAlert(fmt, ...) { [[[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%s\n [LinE %d] ", __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"OK(debug mode)" otherButtonTitles:nil] show]; }
  12. #define XYLog(fmt, ...) NSLog((@"%s [LinE %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
  13. #else // 发布状态, 关闭LOG功能
  14. #define KyoLog(...) (void)0;
  15. #define KyoAlert(...) (void)0;
  16. #define XYLog(...) (void)0;
  17. #endif
  18. #define ksharedAppDelegate [AppDelegate sharedAppDelegate] // AppDelegate 单例
  19. /**第三方库*/
  20. #import "Masonry.h"
  21. #import "UIView+HWCategory.h"
  22. #import "UIScrollView+EmptyDataSet.h"
  23. #import "SVProgressHUD.h"
  24. /**工具类*/
  25. #import "iToast.h"
  26. #import "iTools.h"
  27. #import "HWDataManager.h"
  28. #import "NSObject+Extensions.h"
  29. /**配置文件*/
  30. #import "Const.h"
  31. #import "Enum.h"
  32. #import "Notification.h"
  33. #import "ColorDefine.h"
  34. #import "BaseModel.h"
  35. //网络相关
  36. #import "netWorkManager.h"
  37. #import "newWorkInterface.h"
  38. #import "AFNetworkReachabilityManager.h"
  39. #import "AppDelegate.h"
  40. #import "connectDeviceManager.h"
  41. #import "cachesFileManager.h"
  42. #import "ComontAlretViewController.h"
  43. //#import "webSocketManager.h"
  44. #import "webRtcManager.h"
  45. #import "pingManager.h"
  46. #import "MJExtension.h"
  47. #import "RSATool.h"
  48. #import "lastFileManager.h"
  49. #import "couldPhoneFileListModel.h"
  50. #import "nasBackupsManager.h"
  51. #import "nasMixBackupsManager.h"
  52. #import "nasDownloadFileManager.h"
  53. #import "downloadManager.h"
  54. #import "couldphoneSysInfoModel.h"
  55. #ifdef DEBUG // 调试状态, 打开LOG功能
  56. #define HLog(fmt, ...) NSLog((@"%@ %s [Line %d] " fmt),[iTools getNowTimeString3], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
  57. #else // 发布状态, 关闭LOG功能
  58. #define HLog(...) (void)0;
  59. #endif
  60. #define globalBlock(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), block)
  61. /**宏定义*/
  62. #define mainBlock(block) dispatch_async(dispatch_get_main_queue(), block)
  63. #define KWeakSelf __weak typeof(*&self) weakSelf = self; //block 快速宏定义
  64. #define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
  65. #define SCREEN_W [[UIScreen mainScreen] bounds].size.width
  66. #define SCREEN_H [[UIScreen mainScreen] bounds].size.height
  67. #define H_NAV_BAR self.navigationController.navigationBar.frame.size.height
  68. #define H_STATE_BAR [[UIApplication sharedApplication] statusBarFrame].size.height
  69. #define WAUTOSCALE ([[UIScreen mainScreen] bounds].size.width / 375) // 缩放比例
  70. #define HAUTOSCALE ([[UIScreen mainScreen] bounds].size.height / 667)
  71. //泛指刘海屏
  72. #define IPHONE_X ({\
  73. BOOL isBangsScreen = NO; \
  74. if (@available(iOS 11.0, *)) { \
  75. UIWindow *window = [[UIApplication sharedApplication].windows firstObject]; \
  76. isBangsScreen = window.safeAreaInsets.bottom > 0; \
  77. } \
  78. isBangsScreen; \
  79. })
  80. #define safeArea (IPHONE_X ? 44.f : 0.f) //安全区域
  81. #define NAVIHEIGHT (IPHONE_X ? 88 : 64) //导航
  82. #define TABBARHEIGHT (IPHONE_X ? 83 : 49) // 分栏
  83. #define AdaptTabHeight (IPHONE_X ? 34 : 0) //Tabbar 圆角部分高度
  84. #define AdaptNaviHeight (IPHONE_X ? 24 : 0) //状态栏高度
  85. #define AUTOSCALE ([[UIScreen mainScreen] bounds].size.width / 375)
  86. #define WAUTOSCALE ([[UIScreen mainScreen] bounds].size.width / 375)
  87. #define HAUTOSCALE ([[UIScreen mainScreen] bounds].size.height / 667)
  88. //#define CloudService @"http://14.18.190.141:11180"
  89. //#define CloudService @"http://14.18.190.141:1280"
  90. //创维盒子 测试地址 弃用
  91. //弃用 #define CloudService @"http://14.18.190.141:1801"
  92. //弃用 #define shareService @"http://testprivacy.phone.armclouding.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
  93. //创维盒子 测试地址 正在使用
  94. //#define CloudService @"http://testprivacy.phone.androidscloud.com:1801"
  95. //#define shareService @"http://testprivacy.phone.androidscloud.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
  96. //预生产环境
  97. //#define CloudService @"http://testprivacy.phone.androidscloud.com:10900"
  98. //#define shareService @"http://testprivacy.phone.androidscloud.com:10900/h5/#/pages/fileSharing/index?productType=Private-X&token="
  99. //生产环境 弃用
  100. //弃用 #define CloudService @"http://hiboxde.armclouding.com:7780"
  101. //弃用 #define shareService @"http://hiboxde.armclouding.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
  102. //生产环境 1.4.3 开始使用
  103. #define CloudService @"http://hiboxde.androidscloud.com:7780"
  104. #define shareService @"http://hiboxde.androidscloud.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
  105. #define AESCODEKEEYY @"fvO8gAfNSr1tbdQe"
  106. //弃用
  107. //#define EachPieceSzie (512*1024) //每片上传文件大小切割
  108. #define EachPieceSzie (2*1024*1024) //每片上传文件大小切割
  109. #define cutVideoPieceSzie (3 * EachPieceSzie) //视频每次切片多少(切完上传再切一次)
  110. //正在使用
  111. #define MaxNasUploadPieceSzie (15*1024*1024) //frp上传 限制每片最大xx M
  112. #define keyToForgetPwd @"%==%"
  113. #define pageSizeNum 5//500 //分页数量大小
  114. #define FileService @"http://file.phone.androidscloud.com:8210/document/file/lowLevelMultipartUpload"
  115. #define Const_File_Access_Key @"ikIm5C0KjKNvusTF6tIH" //@"13d0arghebcc4cm49cf04"
  116. #define WXAPPid @"wx9f3e477e0df9bf03"
  117. #define WXAppSecret @""
  118. #define wxuniversalLink @"https://c0b494fd81055077cdcd8bec3cddcb12.share2dlink.com/"
  119. #define QQAPPid @"102085690"
  120. #define QQUniversalLink @"https://c0b494fd81055077cdcd8bec3cddcb12.share2dlink.com/qq_conn/102085690"
  121. #define User_Info_tableName(userName) [[NSString alloc] initWithFormat:@"User_Info_tableName_%@",userName];
  122. #define stringKeyAddSn(key) [[NSString alloc] initWithFormat:@"%@_%@",key,ksharedAppDelegate.DeviceThirdIdMod.data.sn]
  123. #define backups_photos_tableName [[NSString alloc] initWithFormat:@"backups_photos_tableName_%@",ksharedAppDelegate.DeviceThirdIdMod.data.sn]
  124. #define P2PModelList_bg_tableName(userName) [[NSString alloc] initWithFormat:@"P2PModelList_bg_tableName_%@",userName];
  125. #define DB_HWBuryPointModelList_TableName @"DB_HWBuryPointModelList_New"
  126. #endif /* PrefixHeader_pch */