Files
real-e-party-iOS/YuMi/E-P/Common/EPSDKManager+NIM.swift
edwinQQQ 681b011c99 refactor: 更新 AppDelegate 和模块导入以简化配置管理
主要变更:
1. 移除不必要的模块导入,简化 AppDelegate 中的代码结构。
2. 引入新的 EPConfigManager 和 EPNIMManager,统一配置管理和 NIMSDK 初始化逻辑。
3. 更新相关方法以使用 block 回调,提升代码的可读性和维护性。
4. 新增 EPClientAPIBridge 和相关配置文件,增强项目的模块化。

此更新旨在提升代码的可维护性,减少冗余实现,确保配置管理的一致性。
2025-10-20 18:07:44 +08:00

28 lines
637 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// EPSDKManager+NIM.swift
// YuMi
//
import Foundation
@objc extension EPSDKManager {
/// NIMSDK ClientConfig nimKey
@objc func initializeNIMSDK(completion: ((NSError?) -> Void)? = nil) {
EPNIMManager.shared().initialize { error in
completion?(error as NSError?)
}
}
/// APNS token NIM
@objc func updateNIMApnsToken(_ deviceToken: Data) {
EPNIMManager.shared().updateApnsToken(deviceToken)
}
/// NIM
@objc func nimUnreadCount() -> Int {
return Int(EPNIMManager.shared().allUnreadCount())
}
}