PrefixHeader.pch 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. #ifndef PrefixHeader_pch
  2. #define PrefixHeader_pch
  3. #ifdef __OBJC__
  4. #import "MBProgressHUD+MJ.h"
  5. #import "cityDefault.h"
  6. #import "UIImageView+WebCache.h"
  7. //#import "UIImage+AFNetworking.h"
  8. #import "UIButton+WebCache.h"
  9. #import "SBJson.h"
  10. #import "Config.h"
  11. #import "common.h"
  12. #import "YBPower.h"
  13. #import "Masonry.h"
  14. #import "UIView+AdditionsX12.h"
  15. #import "UIImage+RKColor.h"
  16. #import "YBBaseAppDelegate.h"
  17. #import "DspLoginVC.h"
  18. #import "AppDelegate.h"
  19. #import <JPUSHService.h>
  20. #import <JMessage/JMessage.h>
  21. #import "JChatConstants.h"
  22. #import "BGSetting.h"
  23. #import "PublicObj.h"
  24. #import "PublicView.h"
  25. #import "YBNetworking.h"
  26. #import "MyTextField.h"
  27. #import "MyTextView.h"
  28. #import "UIView+LBExtension.h"
  29. #import <SDWebImage/UIImage+GIF.h>
  30. #import <SDWebImage/SDWebImageManager.h>
  31. #import <SDWebImage/SDWebImageDownloader.h>
  32. #import <MJRefresh/MJRefresh.h>
  33. #import <IQKeyboardManager/IQKeyboardManager.h>
  34. #import "RKLBSManager.h"
  35. #import "YBBaseViewController.h"
  36. #import "YBAlertView.h"
  37. #import "YBPageControl.h"
  38. #import "YBLanguageTools.h"
  39. #import "StorageConfig.h"
  40. #import "YBInviteCode.h"
  41. #import "PubH5.h"
  42. #import "RKActionSheet.h"
  43. #import "RKKeepAlive.h"
  44. #import "RKSysAccess.h"
  45. #import "YBDayTaskManager.h"
  46. #import "YBLiveRoomAlertView.h"
  47. #import "YBButton.h"
  48. #import "TZImagePickerController.h"
  49. #import <JKCategories.h>
  50. #import <UIScrollView+EmptyDataSet.h>
  51. #import "YBYoungManager.h"
  52. #import "YBNavigationController.h"
  53. #import "THeader.h"
  54. #import "YBImManager.h"
  55. #import "YBMessageManager.h"
  56. #import "GDYTranslateTool.h"
  57. #import <ImSDK_Plus/ImSDK_Plus.h>
  58. #import "YBCreatorHeader.h"
  59. #import "YBActiveManager.h"
  60. #import "NSObject+RKLog.h"
  61. #endif
  62. #define purl @"http://xxxxx.com/appapi/"
  63. #define h5url @"http://xxxxxx.com"
  64. //腾讯IM
  65. #define TXIMSdkAppid 14xxxxxx7
  66. /*
  67. 腾讯tpns推送
  68. 腾讯tpns推送服务接入点
  69. 上海 @"tpns.sh.tencent.com"
  70. 新加坡 @"tpns.sgp.tencent.com"
  71. 香港 @"tpns.hk.tencent.com"
  72. 广州 @"tpns.tencent.com"
  73. */
  74. #define TXPushAccessID 16xxxxxx60
  75. #define TXPushAccessKey @"I6xxxxxxJ"
  76. #define TXPushClusterDomain @"tpns.sh.tencent.com"
  77. //腾讯地图key
  78. #define TencentKey @"TDFxxxxxxxxxxxxxxxxF-4KB2T"
  79. //百度语音识别 在此填写应用的 appid(即appcode)、 api key、 secret key"
  80. #define ASR_APP_ID @"26xxxxxx6"
  81. #define ASR_API_KEY @"5nxxxxxxxxx09z"
  82. #define ASR_SECRET_KEY @"mkzxxxxxxxxxxxxi9K"
  83. //Bugly
  84. #define BuglyId @"91xxxxxxxxxx0"
  85. //友盟
  86. #define UMAppKey @"5cxxxxxxxxxxxxxx8b4"
  87. #define UMChannel @""
  88. // 测试 com.yunbao.one
  89. #define LicenceDspURL @"https://license.vod2.myqcloud.com/license/v2/1302642885_1/v_cube.license"
  90. #define LicenceDspKey @"efbxxxxxxxxxxxxxxf45f"
  91. #define LicenceLiveUrl @"https://license.vod2.myqcloud.com/license/v2/1300846245_1/v_cube.license"
  92. #define LicenceLiveKey @"512xxxxxxxxxxxxxxxxd2c8"
  93. #pragma mark - 三方接入信息 注意 在info 中也要配置 QQ要配置两个(tencent+QQAppId || QQ+QQAppId的16进制 )
  94. //QQ
  95. #define QQAppId @"10xxxxxxxx8"
  96. #define QQAppKey @"e49xxxxxxxxxxxxxxxxxba"
  97. #define QQUniversalLink @"https://xxxxxxx.com/qq_conn/101xxxx98"
  98. //wechat
  99. #define WechatAppId @"wx7bxxxxxxxxxb58"
  100. #define WechatAppSecret @"f840cxxxxxxxxxxxxxxxx35cd5"
  101. #define WechatUniversalLink @"https://xxxxxxxx.com/"
  102. #define WechatUsername @"gh_e0130aea3153"
  103. #pragma mark -
  104. //极光【废弃】
  105. #define JpushAppKey @"4e4fd111f011e9e6b031af68"
  106. #define JmessageName @""
  107. #define Jchannel @"Publish channel"
  108. #define isProduction YES
  109. #define YBWeakSelf __weak typeof(self) weakSelf = self;
  110. #define minstr(a) [NSString stringWithFormat:@"%@",a]
  111. #define strFormat(str) ([PublicObj checkNull:[NSString stringWithFormat:@"%@",str]] \
  112. ? @"" : [NSString stringWithFormat:@"%@",str])
  113. //rk_1-31 是否加版权展示 0-不展示 1-展示
  114. #define showCopyright 0
  115. #define copyrightDes @"Copyright©2013-2020,XXX All rights reserved"
  116. //腾讯SDK 最大、最小录制时间 去 VideoRecordProcessView.h 配置
  117. //#define MAX_RECORD_TIME 15
  118. //#define MIN_RECORD_TIME 5
  119. //短视频录制时长控制
  120. #define live_MAX_RECORD_TIME 15
  121. #define live_MIN_RECORD_TIME 5
  122. #define ios8 [[UIDevice currentDevice].systemVersion floatValue] <9
  123. #define iOS11Later ([UIDevice currentDevice].systemVersion.floatValue >= 11.0f)
  124. ///通知
  125. //青少年模式时间到了
  126. #define ybYoungModelTimeEndEvent @"young_model_time_end"
  127. // 青少年模式开关状态改变
  128. #define ybYoungModelSwitchChage @"young_model_switch_change"
  129. //@规则
  130. #define kATRegular @"@[\\u4e00-\\u9fa5\\w\\-\\_]+ "
  131. //emoji规则
  132. #define emojiPattern @"\\[\\w+\\]"
  133. //rk_1-30
  134. #define DoubleClickRefreshNot @"DoubleClickRefreshNot"
  135. //颜色
  136. #define Pink_Cor RGB_COLOR(@"#EA377F", 1)
  137. #define Pink_Cor_Dis RGB_COLOR(@"#EA377F", 0.5)
  138. #define Orange_Cor RGB_COLOR(@"#FF6131", 1)
  139. #define Normal_Color RGB_COLOR(@"#110D24", 1)
  140. #define Normal_TextColor RGB(150, 150, 150)
  141. #define Normal_BackColor RGB(17, 13, 35)
  142. #define Normal_SubColor RGB(24, 21, 43)
  143. #define RGB(r,g,b) [UIColor colorWithRed:(r)/255.f \
  144. green:(g)/255.f \
  145. blue:(b)/255.f \
  146. alpha:1.f]
  147. #define RGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:a]
  148. #define CellRow_Cor RGB_COLOR(@"#15102C", 1)
  149. #define SelCell_Col RGB_COLOR(@"#1c1733", 1)
  150. #define GrayText RGB_COLOR(@"#969696", 1)
  151. #define Line_Cor RGB_COLOR(@"#ffffff", 0.06)
  152. #define AtCol RGB_COLOR(@"#f2e50b", 1)
  153. //Tab
  154. #define Tab_bgc RGB_COLOR(@"#000000", 0)
  155. #define Tab_nor RGB_COLOR(@"#dcdcdc", 1)
  156. #define Tab_sel RGB_COLOR(@"#ffffff", 1)
  157. #define ybNodataCol RGB_COLOR(@"#969696", 1)
  158. #define ybPopBgCol RGB_COLOR(@"#000000", 0.4)
  159. //图片
  160. #define FOREGROUND_STAR_IMAGE_NAME @"start_select_评价"
  161. #define BACKGROUND_STAR_IMAGE_NAME @"start_normal_评价"
  162. #define Comm_FOREGROUND_STAR_IMAGE_NAME @"comm_star_实心"
  163. #define Comm_BACKGROUND_STAR_IMAGE_NAME @"comm_star_空心"
  164. #define video_FOREGROUND_STAR_IMAGE_NAME @"videocontent_评价sel"
  165. #define video_BACKGROUND_STAR_IMAGE_NAME @"videocontent_评价normal"
  166. //字体
  167. #define SYS_Font(a) [UIFont systemFontOfSize:(a)]
  168. #define ybNodataFont [UIFont systemFontOfSize:13]
  169. //导航
  170. #define NaviBg_Color RGB_COLOR(@"#15102c", 1)
  171. #define NaviTitle_Color [UIColor whiteColor]
  172. #define NaviTitle_Font [UIFont boldSystemFontOfSize:17]
  173. //语言
  174. #define YZMsg(key) [[YBLanguageTools shareInstance] getStringForKey:key withTable:@"InfoPlist"]
  175. #define CurrentLanguage @"will_show_language"
  176. #define getImagename(a) [NSString stringWithFormat:@"%@%@",a,[common getLanguage]]
  177. #define lagType [[NSUserDefaults standardUserDefaults] objectForKey:@"will_show_language"]
  178. #define ZH_CN @"zh-Hans"
  179. #define EN @"en"
  180. //
  181. #define _pageBarWidth _window_width *0.65
  182. #define _window_width [UIScreen mainScreen].bounds.size.width
  183. #define _window_height [UIScreen mainScreen].bounds.size.height
  184. #define RGB_COLOR(_STR_,a) ([UIColor colorWithRed:[[NSString stringWithFormat:@"%lu", strtoul([[_STR_ substringWithRange:NSMakeRange(1, 2)] UTF8String], 0, 16)] intValue] / 255.0 green:[[NSString stringWithFormat:@"%lu", strtoul([[_STR_ substringWithRange:NSMakeRange(3, 2)] UTF8String], 0, 16)] intValue] / 255.0 blue:[[NSString stringWithFormat:@"%lu", strtoul([[_STR_ substringWithRange:NSMakeRange(5, 2)] UTF8String], 0, 16)] intValue] / 255.0 alpha:a])
  185. #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
  186. green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
  187. blue:((float)(rgbValue & 0xFF))/255.0 \
  188. alpha:1.0]
  189. //iPhone X
  190. #define IS_BIG_SCREEN (IS_IPHONE && SCREEN_MAX_LENGTH > 667.0)
  191. #define iPhoneX (_window_height >= 812.f)
  192. #define ShowDiff (iPhoneX ? 34: 0)
  193. #define ElBotSpace (ShowDiff ? ShowDiff : 18)
  194. //#define statusbarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height-20)
  195. #define statusbarHeight ([UIApplication sharedApplication].delegate.window.windowScene.statusBarManager.statusBarFrame.size.height-20)
  196. #define topStatusBarHeight (iPhoneX ? 44.0 : 20.0)
  197. #define naviContentHeight 44.0
  198. #define naviHight (topStatusBarHeight + naviContentHeight)
  199. #define tabBarSafeSpace (iPhoneX ? 34.0 : 0.0)
  200. #define tabBarContentHeight 49.0
  201. #define tabBarHeight (tabBarSafeSpace + tabBarContentHeight)
  202. //音视频通话缓存key
  203. #define ybUnexpectedDealTime 5
  204. #define ybAudioVideoCallWaitting 10
  205. #define ybAudioVideoCallCtrKey @"audio_video_call_user_enter"
  206. #define ybIsStartCallKey @"isStartCall"
  207. // 呼叫方呼叫超时 显示是否预约弹窗状态
  208. #define ybIsSubscribeWaitting @"issSubscribeWaitting"
  209. //进入房间缓存key
  210. #define ybMatchRoomCtrKey @"match_room_user_enter"
  211. //IM呼叫者id
  212. #define ybImCallingUid @"CallingUid"
  213. //正在聊天的id
  214. #define ybImChatingUid @"messageingUserID"
  215. // IM主动刷新
  216. #define ybImNeedRefresh @"imNeedRefresh"
  217. // IM私信未读数量改变
  218. #define ybImUnreadChange @"ybImUnreadChange"
  219. // 邀请、退出、撤回
  220. #define ybImConveEvent @"ybImConveEvent"
  221. // IM小窗高度改变
  222. #define ybImSamllChange @"ybImSamllChangeEvent"
  223. // IM C2C 顶部关注
  224. #define ybImC2CFollow @"ybImC2CFollow"
  225. #define TransAppId @"25886636"
  226. #define TransApiKey @"RerdgAnvdBNPZW6alfd64AXa"
  227. #define TransSecret @"jfF3LnQYTba4W2KdmwzjedtPQh1KYYpS"
  228. #define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
  229. #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  230. #define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0)
  231. #define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width)
  232. #define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
  233. #define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT))
  234. #define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT))
  235. #define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0)
  236. #define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0)
  237. #define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0)
  238. #define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0)
  239. #define IS_IPHONE_X (IS_IPHONE && SCREEN_MAX_LENGTH >= 812.f)
  240. #if DEBUG
  241. //#import <UIKit/UIKit.h>
  242. #define NSLog(FORMAT, ...) fprintf(stderr,"\n【DEBUG】[%s %s:%d行] %s\n",\
  243. [((id(*)(void))method_getImplementation(class_getClassMethod(NSObject.class, @selector(rk_getConsoleLogOfTime))))() UTF8String], \
  244. [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], \
  245. __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
  246. #else
  247. //#import <UIKit/UIKit.h>
  248. #define NSLog(FORMAT, ...) nil
  249. #endif
  250. #endif /* PrefixHeader_pch */
  251. //#if 1
  252. //#define NSLog(FORMAT, ...) fprintf(stderr,"[%s:%d行] %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
  253. //#else
  254. //
  255. //#define NSLog(FORMAT, ...) nil
  256. //
  257. //#endif
  258. //#ifndef __OPTIMIZE__
  259. //# define NSLog(...) NSLog(__VA_ARGS__)
  260. //#else
  261. //# define NSLog(...)
  262. //#endif
  263. //rk_Referer、"Referer
  264. /*
  265. * 1.SVGAParser.m
  266. * parseWithURL:
  267. * //rk_Referer
  268. request.allHTTPHeaderFields = @{@"referer":@""};
  269. *
  270. * 2.YYWebImageManager.m
  271. * initWithCache:
  272. * //rk_Referer *前的反斜线
  273. if (YYImageWebPAvailable()) {
  274. _headers = @{ @"Accept" : @"image/webp,image/\*;q=0.8",@"referer":@""};
  275. } else {
  276. _headers = @{ @"Accept" : @"image/\*;q=0.8",@"referer":@""};
  277. }
  278. *
  279. * KSMediaPlaerManager.m
  280. * initializePlayer
  281. * //rk_Referer
  282. NSMutableDictionary *headerDic = [NSMutableDictionary dictionary];
  283. [headerDic setObject:@"" forKey:@"Referer"];
  284. [self.player setHttpHeaders:headerDic];
  285. */
  286. //#define HLFBKey @"e6ed81d408d08db5280937e8d007394c"
  287. //测试 //com.inlive.phonelive
  288. //#define LicenceDspURL @"http://license.vod2.myqcloud.com/license/v1/6bac8634bf98183083c195bc54ede3e2/TXUgcSDK.licence"
  289. //#define LicenceDspKey @"d0e2c76de7a418016a4053e4dc7a0604"
  290. //#define LicenceLiveUrl @"http://license.vod2.myqcloud.com/license/v1/6bac8634bf98183083c195bc54ede3e2/TXLiveSDK.licence"
  291. //#define LicenceLiveKey @"d0e2c76de7a418016a4053e4dc7a0604"