# LGMessageAcceptPro **Repository Path**: langejituan/LGMessageAcceptPro ## Basic Information - **Project Name**: LGMessageAcceptPro - **Description**: 智能考场消息模块代码 - **Primary Language**: Objective-C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-09-10 - **Last Updated**: 2021-11-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DWMessagePro #### 介绍 消息模块。目前主要应用于智能考场消息模块 #### 软件架构 模块原理是利用轮询定时访问消息数量接口,若消息数量大于0,我们则认为有消息推送。 通过监听可以更新消息的红点显示,达到应用内部消息处理的业务需求。 #### 安装教程 1. 在podfile文件中的头部添加文件源 source 'https://github.com/CocoaPods/Specs.git' source 'https://gitee.com/dangwc/DWSpecs.git' 2. 添加模块代码 pod'DWMessagePro','~>0.0.5' //注意版本号 #### 使用说明 //轮询开始 -(void)pollSeting{ [DWMessageManger shareManager].subUrl = @"http://192.168.129.164:10703/"; [DWMessageManger shareManager].userID = @"s20001"; [DWMessageManger shareManager].pollInterval = 10;//默认时间10s [[DWMessageManger shareManager] startPolling]; //添加监听 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateRedPointState:) name:DWREFRESHMESSAGEDATA object:nil]; } //消息处理 -(void)updateRedPointState:(NSNotification *)notification{ NSDictionary *msgDic = notification.object; NSNumber *isUpdate = [msgDic valueForKey:@"MsgUpdate"]; if (isUpdate.boolValue) { NSLog(@"有消息要更新了。。。。"); } } #### 参与贡献 文档由daviedang整理发布 QQ:1124404942 #### 码云特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)