Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ let AppKey: String = <#AppKey#>
```
- 将注册的AppKey填入其中。
- 在终端cd到podfile所在的文件目录,复制代理到终端,执行`pod install`命令,等待成功后点击运行即可。
- 将用户名以及token复制粘贴填写在输入框中->然后点击登录->选择呼叫类型->输入呼叫用户的userId->点击呼叫。
- 将用户Id以及token复制粘贴填写在`PublicDefines.swift`中即可。注意需要安装两个设备两个用户登录测试
- 若需发起群组通话,才需要[创建群组](https://v2-console.easemob.com/app/operation/management/micro/app/im-service/operative-service/group),将已创建用户加入群组见下图,让其中一两个用户登录后,将群组id复制到输入框中点击呼叫即可。

![](./DocumentationImages/joinGroup.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,23 @@ open class CallMultiViewController: UIViewController {
self.addCallTimer()
}
self.view.addSubViews([self.background, self.navigationBar,self.bottomView,self.callView])
// if let call = CallKitManager.shared.callInfo, (call.state == .answering || call.state == .dialing) {
// self.callView.updateWithItems()
// }
self.bottomView.updateButtonSelectedStatus(selectedIndex: 3)
self.callView.isHidden = !state
// Do any additional setup after loading the view.
self.setupNavigationState()
if let groupId = CallKitManager.shared.callInfo?.groupId, !groupId.isEmpty {
let groupName = CallKitManager.shared.callInfo?.groupName ?? groupId
var avatarURL = CallKitManager.shared.callInfo?.groupAvatar ?? ""
var showName = groupName
if let chatGroup = ChatGroup(id: groupId) {
if !chatGroup.groupName.isEmpty {
showName = chatGroup.groupName
let avatarURL = CallKitManager.shared.callInfo?.groupAvatar ?? chatGroup.groupAvatar
self.navigationBar.avatarURL = avatarURL
if avatarURL.isEmpty {
avatarURL = chatGroup.groupAvatar
}
}
}
self.navigationBar.avatarURL = avatarURL
self.navigationBar.title = showName
}
self.navigationBar.clickClosure = { [weak self] in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ import UIKit
Task {
let profiles = await CallKitManager.shared.profileProvider?.fetchGroupProfiles(profileIds: [groupId])
if let profile = profiles?.first {
if let group = ChatGroup(id: self.groupId) {
self.groupName = profile.nickname
self.groupAvatar = profile.avatarURL
if let group = ChatGroup(id: self.groupId),self.groupName.isEmpty,self.groupAvatar.isEmpty {
self.groupName = profile.nickname
self.groupAvatar = profile.avatarURL
}
Expand All @@ -89,7 +91,9 @@ import UIKit
CallKitManager.shared.profileProviderOC?.fetchGroupProfiles(profileIds: [groupId]) { [weak self] profiles in
guard let `self` = self else { return }
if let profile = profiles.first {
if let group = ChatGroup(id: self.groupId) {
self.groupName = profile.nickname
self.groupAvatar = profile.avatarURL
if let group = ChatGroup(id: self.groupId),self.groupName.isEmpty,self.groupAvatar.isEmpty {
self.groupName = profile.nickname
self.groupAvatar = profile.avatarURL
}
Expand Down