AppConfigHeader.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. //
  2. // AppConfigHeader.h
  3. // DevelopUtils_Objective_C
  4. //
  5. // Created by 翟玉磊 on 2018/9/14.
  6. // Copyright © 2018年 翟玉磊. All rights reserved.
  7. //
  8. #ifndef AppConfigHeader_h
  9. #define AppConfigHeader_h
  10. /// 3:127.xxx、192.168.x.x 2:预发 1:测试 0:正式
  11. #define IS_DEBUG 1
  12. #define APP_ID @"" //苹果id
  13. /// 工程名字
  14. #define APP_EXECUTABLE_FILE @"Starbuds"
  15. /// APP名字
  16. //#define APP_NAME [[NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:APP_LANGUAGE ofType:@"lproj"]] localizedStringForKey:(@"CFBundleDisplayName") value:nil table:@"InfoPlist"]
  17. #define APP_NAME [NSString kcAppName]
  18. /// APP版本号
  19. #define APP_VERSION ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"])
  20. /// APP build
  21. #define APP_BUILD ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"])
  22. /// APP 包名
  23. #define APP_BundleIdentifier ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"])
  24. /// 客服电话
  25. #define SERVICE_PHONE @"0571-28321061"
  26. /// 分页单页个数
  27. #define PQ_PAGE_SIZE 20
  28. /// 头像url加后缀
  29. #define Avatar_urlString(__string) [NSString stringWithFormat:@"%@!sq96", __string]
  30. /// 缩略图后缀 x列表360 详情750
  31. #define Thumbnail_Suffix(__string) [NSString stringWithFormat:@"%@!sq", __string]
  32. /// 列表封面缩略图后缀
  33. #define List_Thumbnail_Suffix @"!sq350"
  34. /// 开启隐藏关注功能的勋章等级
  35. #define Open_Hiden_Follow_Medal_Level 5
  36. #pragma mark - ----------默认图----------
  37. /** 占位图 */
  38. static inline UIImage *const placeholderImage() {
  39. return [UIImage imageNamed:@"placeholder_image"];
  40. }
  41. /** 占位头像 */
  42. static inline UIImage *const placeholderUserIcon () {
  43. return [UIImage imageNamed:@"placeholder_user_image"];
  44. }
  45. /** 更多图片 */
  46. static inline UIImage *const arrowMore () {
  47. return [UIImage imageNamed:@"icon_more"];
  48. }
  49. /** banner占位图 */
  50. static inline UIImage *const placeholderBannerImage() {
  51. return [UIImage imageNamed:@"placeholder_banner_image"];
  52. }
  53. /** 性别 女生图标 */
  54. static inline UIImage *const sexGirlImage() {
  55. return [UIImage imageNamed:@"icon_sex_nv"];
  56. }
  57. /** 性别 男生图标 */
  58. static inline UIImage *const sexBoyImage() {
  59. return [UIImage imageNamed:@"icon_sex_nan"];
  60. }
  61. /** 视频默认背景图片 */
  62. static inline UIImage *const placeholderVideoBgImage() {
  63. return [UIImage imageNamed:@"icon_video_bg_image"];
  64. }
  65. /** 个人主页默认背景图片 */
  66. static inline UIImage *const placeholderUserMainBgImage(NSInteger sex) {
  67. if (sex == 1) {
  68. return [UIImage imageNamed:@"placeholder_user_nan_bg"];
  69. }
  70. return [UIImage imageNamed:@"placeholder_user_nv_bg"];
  71. }
  72. /** app icon */
  73. static inline UIImage *const placeholderAppIconImage() {
  74. return [UIImage imageNamed:@"icon_logo_114"];
  75. }
  76. #pragma mark - ----------通知名称----------
  77. /// 用户登陆状态改变
  78. static NSString * const USER_LOGIN_STATUS_NOTIFICATION = @"USER_LOGIN_STATUS_NOTIFICATION";
  79. /// 更新用户资料通知
  80. static NSString * const UPDATE_USER_INFO_NOTIFICATION = @"UPDATE_USER_INFO_NOTIFICATION";
  81. /// 修改名字通知
  82. static NSString * const USER_MODIFY_NAME_NOTIFICATION = @"USER_MODIFY_NAME_NOTIFICATION";
  83. /// 微信登录授权成功通知
  84. static NSString * const WECHAT_LOGIN_SUCCESS_NOTIFICATION = @"WECHAT_LOGIN_SUCCESS_NOTIFICATION";
  85. /// QQ登录授权成功通知
  86. static NSString * const QQ_LOGIN_SUCCESS_NOTIFICATION = @"QQ_LOGIN_SUCCESS_NOTIFICATION";
  87. /// 微博登录授权成功通知
  88. static NSString * const SINA_LOGIN_SUCCESS_NOTIFICATION = @"SINA_LOGIN_SUCCESS_NOTIFICATION";
  89. /// 微信APP支付回调通知
  90. static NSString * const WECAHT_APP_PAY_NOTIFICATION = @"WECAHT_APP_PAY_NOTIFICATION";
  91. /// 支付宝APP支付回调通知
  92. static NSString * const ALI_APP_PAY_NOTIFICATION = @"ALI_APP_PAY_NOTIFICATION";
  93. /// 支付宝APP绑定成功回调
  94. static NSString * const ALI_BIND_SUCCESS_NOTIFICATION = @"ALI_BIND_SUCCESS_NOTIFICATION";
  95. /// 视频列表分类update通知
  96. static NSString * const UPDATE_VIDEO_CATEGORY_NOTIFICATION = @"UPDATE_VIDEO_CATEGORY_NOTIFICATION";
  97. /// 金币余额变更通知 在使用和充值后都要更新数据库的余额 之后发起这个通知 在需要显示余额的地方可以监听这个通知 从数据控获取显示
  98. static NSString * const BALANCE_UPDATE_NOTIFICATION = @"BALANCE_UPDATE_NOTIFICATION";
  99. /// 刷新直播间活动列表
  100. static NSString * const REFRESH_LIVE_ACTIVITY_LIST_NOTIFICATION = @"REFRESH_LIVE_ACTIVITY_LIST_NOTIFICATION";
  101. /// H5用户信息改变通知 当用户的信息在H5中改变则触发此消息,刷新需要修改的本地信息
  102. static NSString * const REFRESH_H5_USER_INFO_CHANGE_NOTIFICATION = @"REFRESH_H5_USER_INFO_CHANGE_NOTIFICATION";
  103. /// 视频呼叫超时通知
  104. static NSString * const VIDEO_CALL_TIMEOUT_NOTIFICATION = @"VIDEO_CALL_TIMEOUT_NOTIFICATION";
  105. /// APP将要进入活跃状态
  106. static NSString * const APP_WILL_ENTER_FOREGROUND_NOTIFICATION = @"APP_WILL_ENTER_FOREGROUND_NOTIFICATION";
  107. /// APP将要进入非活跃状态
  108. static NSString * const APP_WILL_ENTER_BACKGROUND_NOTIFICATION = @"APP_WILL_ENTER_BACKGROUND_NOTIFICATION";
  109. ///视频内容发布成功通知
  110. static NSString * const RELEASE_VIDEO_SUCCESS_NOTIFICATION = @"RELEASE_VIDEO_SUCCESS_NOTIFICATION";
  111. ///图片内容发布成功通知
  112. static NSString * const RELEASE_IMAGE_SUCCESS_NOTIFICATION = @"RELEASE_IMAGE_SUCCESS_NOTIFICATION";
  113. /// 速配语聊通知
  114. static NSString * const VOICE_MATCH_NOTIFICATION = @"VOICE_MATCH_NOTIFICATION";
  115. /// APP私聊消息inputbar礼物按钮点击事件
  116. static NSString * const PRIVATE_CHAT_GIFTACTION_NOTIFICATION = @"PRIVATE_CHAT_GIFTACTION_NOTIFICATION";
  117. /// XYLiveRoomChatListCell点击特殊view事件
  118. static NSString * const LIVEROOM_CHATLIST_CELL_NOTIFICATION = @"LIVEROOM_CHATLIST_CELL_NOTIFICATION";
  119. /// 开通贵族通知
  120. static NSString * const OPEN_NOBLE_NOTIFICATION = @"OPEN_NOBLE_NOTIFICATION";
  121. /// 派单消息红点隐藏状态更新通知 需要更新红点显示
  122. static NSString * const DISPATCH_ORDER_BADGE_HIDE_STATE_UPDATE_NOTIFICATION = @"DISPATCH_ORDER_BADGE_HIDE_STATE_UPDATE_NOTIFICATION";
  123. /// 心愿任务开关状态变更通知
  124. static NSString * const WISH_TASK_SWITCH_NOTIFICATION = @"WISH_TASK_SWITCH_NOTIFICATION";
  125. /// 活动变更通知,如蛋糕结束
  126. static NSString * const ACTIVITY_UPDATE_NOTIFICATION = @"ACTIVITY_UPDATE_NOTIFICATION";
  127. #pragma mark - ----------NSUserDefaults name-------------
  128. // UserDefault 相关
  129. #define YLUserDefault [NSUserDefaults standardUserDefaults]
  130. #define YLSetUserDefaults(id,key) [[NSUserDefaults standardUserDefaults] setObject:id forKey:key]
  131. #define YLGetUserDefaults(key) [[NSUserDefaults standardUserDefaults] objectForKey:key]
  132. /// 缓存APP配置信息
  133. static NSString * const APP_CONFIG_INFO_USERDEFAULT = @"APP_CONFIG_INFO_USERDEFAULT";
  134. /// 缓存搜索的关键字
  135. static NSString * const SEARCH_KEYWORD_USERDEFAULTS = @"SEARCH_KEYWORD_USERDEFAULTS";
  136. /// 缓存上次选中的国家以及手机区号是字典类型 key: country\areaCode\countryId
  137. static NSString * const LOCAL_COUNTRY_USERDEFAULTS = @"LOCAL_COUNTRY_USERDEFAULTS";
  138. ///苹果支付成功的订单信息 防止支付了后台没有接收到支付成功的回调
  139. static NSString * const APPSTORE_PAY_SUCCESS_INFO_USERDEFAULTS = @"APPSTORE_PAY_SUCCESS_INFO_USERDEFAULTS";
  140. #endif /* AppConfigHeader_h */