云旺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 !**