美文网首页临时收藏
云旺即时通讯iOS

云旺即时通讯iOS

作者: 景超叔叔 | 来源:发表于2016-07-13 10:33 被阅读1453次

云旺demo整理

⁃   1 登录
⁃   2 获取会话列表、好友列表
⁃   2.1 加好友、删好友、拉黑
⁃   3 发消息,收消息
⁃   3.1 消息列表,输入框组件
⁃   3.2 语音、视频、位置
⁃   4 建群,解散群,拉人入群
⁃   5 个人设置,群设置
⁃   6 注销

此文件可方便查看具体的方法在对应的文件里的路径,提高集成云旺SDK效率

IMSDK/Base/MainLogic/SPKitExample(单例类,对云旺SDK的接口调用类,内部统一暴露SDK核心方法)

1 quick start 使用下面三个函数即可完成从程序启动到登录再到登出的完整流程

如果要实现即时通讯,AppDelegate的rootViewController必须先实现以下3个方法:
• [初始化入口函数] - callThisInDidFinishLaunching
• [登录入口函数] - callThisAfterISVAccountLoginSuccessWithYWLoginId
• [登出入口函数] - callThisBeforeISVAccountLogout

2 Basic
基本设置的一些方法
• [初始化] - exampleInit
• [设置证书名] - exampleSetCertName
• [登录] - exampleLoginWithUserID
• [监听连接状态] - exampleListenConnectionStatus
• [注销] - exampleLogout
• [预登录] - examplePreLoginWithLoginId
(预登录:上次登录过账号A,这次app启动,可以直接预登录该帐号,进入查看本地数据。同时发起真正的登录操作,连接IM。)

3 UI pages
和界面有点联系的方法,比如:获取好友列表、打开会话,聊天等这类方法
• [创建会话列表] - exampleMakeConversationListControllerWithSelectItemBlock
• [打开某个会话] - exampleOpenConversationViewControllerWithConversation
• [打开单聊] - exampleOpenConversationViewControllerWithPerson
• [打开群聊] - exampleOpenConversationViewControllerWithTribe
• [打开客服会话] - exampleOpenEServiceConversationWithPersonId
• [创建某个会话] - exampleMakeConversationViewControllerWithConversation

4 自定义业务
• [设置自定义消息] - exampleShowCustomMessageWithConversationController
• [添加或者更新自定义会话] - exampleAddOrUpdateCustomConversation
• [自定义优先级的置顶会话] - exampleAddHighPriorityCustomConversation
• [将会话置顶,或者取消置顶] - exampleMarkConversationOnTop
• [会话Cell] -exampleCustomizeConversationCellWithConversationListController
• [发送透传指令] - exampleSendTransparentCommand
• [插入本地消息] - exampleInsertLocalMessageBody

4 定制
• [自定义全局导航栏] - exampleCustomGlobleNavigationBar
• [自定义皮肤] - exampleCustomUISkin
• [开启群@消息功能] - exampleEnableTribeAtMessage

5 聊天页面自定义
• [添加输入面板插件] - exampleAddInputViewPluginToConversationController
• [设置消息的长按菜单] - exampleSetMessageMenuToConversationController
• [设置气泡最大宽度] - exampleSetMaxBubbleWidth

6 事件Event
• [监听新消息] - exampleListenNewMessage
• [监听自己发送的消息的生命周期] - exampleListenMyMessageLife
• [头像点击事件] - exampleListenOnClickAvatar
• [链接点击事件] - exampleListenOnClickUrl
• [预览大图事件] - exampleListenOnPreviewImage

=============================================

Base目录下文件用途
Tripe目录
• [二维码扫描] - SPQRCodeReaderViewController.h
• [搜索群] - SPSearchTribeViewController.h
• [群聊页面] - SPTribeConversationViewController.h
• [群信息编辑] - SPTribeInfoEditViewController.h
• [群信息列表] - SPTribeListViewController.h
• [群成员列表] - SPTribeMemberListViewController.h
• [群成员列表cell] - SPTribeMemberCell.h
• [群资料] - SPTribeProfileViewController.h
• [群的二维码信息] - SPTribeQRCodeViewController.h
• [群邀请] - SPTribeSystemConversationViewController.h
• [群邀请消息cell] - SPTribeSystemMessageCell.h

View目录
BlackList
• [黑名单] - SPBlackListViewController.h
Contact
• [联系人列表页面] - SPContactListController.h
• [联系人列表cell] - SPContactCell.h
• [联系人管理] - SPContactManager.h
• [联系人资料页面] - SPContactProfileController.h
• [好友请求页面] - SPContactRequestListController.h

跟目录
• [登录页面] - SPLoginController.h
• [查找联系人] - SPSearchContactViewController.h
• [设置页面] - SPSettingController.h
• [底部导航栏] - SPTabBarViewController.h

Customize目录
Customized Message自定义消息
CallingCard 名片
• [自定义名片气泡] - SPCallingCardBubbleChatView.h
• [自定义名片内容model] -SPCallingCardBubbleViewModel.h
• [名片插件] - SPInputViewPluginCallingCard.h

Greeting 打招呼
内容基本同上面类似
Other
• [基础聊天气泡] - SPBaseBubbleChatViewCustomize.h
• [基础聊天气泡数据model] - SPBubbleViewModelCustomize.h
Transparent
• [易懂的插件] - SPInputViewPluginTransparent.h

MainLogic目录
• [云旺SDK API单例类] SPKitExample.h
详解见最顶端
• [工具类] - SPUtil.h

** Are You Ok !**

相关文章

网友评论

  • 13149a3d9e65:您好 , 群聊页面输入@ , 唤起成员列表 , 但是底部的 @all 和 完成两个按钮被UItoolbar 给遮挡了 , 怎么解决 ? 官方demo 也是这样的
  • 黑市掌柜:您好,如何隐藏单聊页面内的输入框呢
  • 微笑不是你:你好 在ivp6下 连接不上ims 知道怎么解决嘛
  • 叫我马小帅:请问登录失败是为什么,不是因为多端登录的原因,同样的代码,demo好用,项目中就登录失败了
  • b42c37df95a7:你好 打开回话列表代码报 语法错误。 let result:YWConversationListViewController = SPKitExample.sharedInstance().ywIMKit.makeConversationListViewController()
    result.title = "最近联系人"
    result.setDidSelectItemBlock { (YWConversation) -> Void in (
    SPKitExample.sharedInstance().exampleOpenConversationViewControllerWithConversation(YWConversation, fromNavigationController: self.navigationController))
    }

    提示:setDidSelectItemBlock 不存在。
    请帮忙 看一下 谢谢
  • 不要动:云旺的账号是淘宝账号吗
    不要动:@ios新手 都找不到在那里注册账号
    不要动:@ios新手 我现在用的是云旺的后台,我用的账号是我的淘宝账号,我已经在云旺那里注册成为了,个人开发者,可是我用这个淘宝账号 在demo哪里登录不了,
    景超叔叔:@ios新手 什么账号都可以,前提是你们后台存在这些账号
  • flowerflower:你好,方便加下扣扣吗?最近公司在用这个框架。
    flowerflower:@景超叔叔 可否加下扣扣说下我现今存在的问题
    景超叔叔:@flowerflower 有问题在下面留言,我都可以回复的

本文标题:云旺即时通讯iOS

本文链接:https://www.haomeiwen.com/subject/mpvsjttx.html