diff --git a/AUIKitCore.podspec b/AUIKitCore.podspec index 8cc053c4..01bc804e 100644 --- a/AUIKitCore.podspec +++ b/AUIKitCore.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'AUIKitCore' - s.version = '0.5.2' + s.version = '0.5.3' s.summary = 'A short description of AUIKit.' # This description is used to generate tags and improve search results. diff --git a/CHANGELOG.md b/CHANGELOG.md index 643f8f16..6f4b6c32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ English | [中文](CHANGELOG.zh.md) +## [0.5.3](https://github.com/AgoraIO-Community/AUIKit/releases/tag/0.5.3) +- [iOS]Compatible with Objective-C + ## [0.5.2](https://github.com/AgoraIO-Community/AUIKit/releases/tag/0.5.2) - appId removed from AUICommonConfig as an attribute of AUIRoomContext - [iOS]Change all methods in AUIRoomManagerRespDelegate to optional diff --git a/CHANGELOG.zh.md b/CHANGELOG.zh.md index 7c979d3e..51bade92 100644 --- a/CHANGELOG.zh.md +++ b/CHANGELOG.zh.md @@ -1,6 +1,9 @@ [English](CHANGELOG.md) | 中文 +## [0.5.3](https://github.com/AgoraIO-Community/AUIKit/releases/tag/0.5.3) +- [iOS]适配Objective-C + ## [0.5.2](https://github.com/AgoraIO-Community/AUIKit/releases/tag/0.5.2) - appId从AUICommonConfig移除,作为AUIRoomContext的属性 - [iOS]AUIRoomManagerRespDelegate里所有方法改为optional diff --git a/iOS/AUIKitCore/Sources/Core/Utils/Network/Model/AUIRoomNetworkModel.swift b/iOS/AUIKitCore/Sources/Core/Utils/Network/Model/AUIRoomNetworkModel.swift index 79744181..ddede80f 100644 --- a/iOS/AUIKitCore/Sources/Core/Utils/Network/Model/AUIRoomNetworkModel.swift +++ b/iOS/AUIKitCore/Sources/Core/Utils/Network/Model/AUIRoomNetworkModel.swift @@ -41,7 +41,7 @@ open class AUIRoomCreateNetworkModel: AUICommonNetworkModel { } } -open class AUIRoomDestoryNetworkModel: AUICommonNetworkModel { +open class AUIRoomDestroyNetworkModel: AUICommonNetworkModel { public override init() { super.init() interfaceName = "/v1/room/destroy" diff --git a/iOS/AUIKitCore/Sources/Service/Impl/AUIRoomManagerImpl.swift b/iOS/AUIKitCore/Sources/Service/Impl/AUIRoomManagerImpl.swift index 833f1046..61f345a9 100644 --- a/iOS/AUIKitCore/Sources/Service/Impl/AUIRoomManagerImpl.swift +++ b/iOS/AUIKitCore/Sources/Service/Impl/AUIRoomManagerImpl.swift @@ -94,7 +94,7 @@ extension AUIRoomManagerImpl: AUIRoomManagerDelegate { aui_info("destroyRoom: \(roomId)", tag: "AUIRoomManagerImpl") self.rtmManager.unSubscribe(channelName: roomId) - let model = AUIRoomDestoryNetworkModel() + let model = AUIRoomDestroyNetworkModel() model.userId = AUIRoomContext.shared.currentUserInfo.userId model.roomId = roomId model.request { error, _ in @@ -144,9 +144,9 @@ extension AUIRoomManagerImpl: AUIRoomManagerDelegate { callback(nil) } - public func getRoomInfoList(lastCreateTime: Int64?, pageSize: Int, callback: @escaping AUIRoomListCallback) { + public func getRoomInfoList(lastCreateTime: Int64, pageSize: Int, callback: @escaping AUIRoomListCallback) { let model = AUIRoomListNetworkModel() - model.lastCreateTime = lastCreateTime == nil ? nil : NSNumber(value: Int(lastCreateTime!)) + model.lastCreateTime = lastCreateTime == 0 ? nil : NSNumber(value: Int(lastCreateTime)) model.pageSize = pageSize model.request { error, list in callback(error as NSError?, list as? [AUIRoomInfo]) diff --git a/iOS/AUIKitCore/Sources/Service/Model/AUIRoomConfig.swift b/iOS/AUIKitCore/Sources/Service/Model/AUIRoomConfig.swift index 915c10aa..ac05cdbc 100644 --- a/iOS/AUIKitCore/Sources/Service/Model/AUIRoomConfig.swift +++ b/iOS/AUIKitCore/Sources/Service/Model/AUIRoomConfig.swift @@ -7,6 +7,7 @@ import Foundation +@objcMembers open class AUICommonConfig: NSObject { /// 网络请求域名 public var host: String = "https://uikit-voiceroom-staging.bj2.agoralab.co" @@ -21,6 +22,7 @@ open class AUICommonConfig: NSObject { } } +@objcMembers open class AUIRoomConfig: NSObject { public var channelName: String = "" //正常rtm使用的频道 public var rtmToken007: String = "" //rtm login用,只能007 diff --git a/iOS/AUIKitCore/Sources/Service/Protocol/AUIRoomManagerDelegate.swift b/iOS/AUIKitCore/Sources/Service/Protocol/AUIRoomManagerDelegate.swift index 7446978e..d2d4c0dd 100644 --- a/iOS/AUIKitCore/Sources/Service/Protocol/AUIRoomManagerDelegate.swift +++ b/iOS/AUIKitCore/Sources/Service/Protocol/AUIRoomManagerDelegate.swift @@ -48,10 +48,10 @@ public protocol AUIRoomManagerDelegate: NSObjectProtocol { /// 获取房间列表 /// - Parameters: - /// - lastCreateTime: 最后1条数据的创建时间, 返回数据list的createTime字段值,如果为空, 默认会设置为服务器当前时间戳 + /// - lastCreateTime: 最后1条数据的创建时间, 返回数据list的createTime字段值,如果为0, 默认会设置为服务器当前时间戳 /// - pageSize: 分页大小 /// - callback: 操作完成回调 - func getRoomInfoList(lastCreateTime: Int64?, pageSize: Int, callback: @escaping AUIRoomListCallback) + func getRoomInfoList(lastCreateTime: Int64, pageSize: Int, callback: @escaping AUIRoomListCallback) /// Description 修改房间公告 /// - Parameters: