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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
8 changes: 4 additions & 4 deletions iOS/App/Info.plist → iOS/Example/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>NSMicrophoneUsageDescription</key>
<string>ChatSalonApp需要访问你的麦克风权限,开启后录制的视频才会有声音</string>
<string>10.2.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2443</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMicrophoneUsageDescription</key>
<string>ChatSalonApp需要访问你的麦克风权限,开启后录制的视频才会有声音</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
6 changes: 2 additions & 4 deletions iOS/Login/AppUtils.swift → iOS/Example/Login/AppUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
// Created by xcoderliu on 12/24/19.
// Copyright © 2019 xcoderliu. All rights reserved.
//
// 用于TRTC_SceneDemo

import UIKit
import ImSDK_Plus

//推送证书 ID
// IMSDK APNS ID
#if DEBUG
let timSdkBusiId: UInt32 = 18069
#else
Expand Down Expand Up @@ -41,7 +40,6 @@ class AppUtils: NSObject {
}

@objc func alertUserTips(_ vc: UIViewController) {
// 提醒用户不要用Demo App来做违法的事情
// 外发代码不需要提示

}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import UIKit
import Alamofire
import ImSDK_Plus
import TUICore

@objc class LoginResultModel: NSObject, Codable {
@objc var token: String
Expand Down Expand Up @@ -107,13 +108,12 @@ import ImSDK_Plus
/// - success: 成功
/// - failed: 失败
@objc func IMLogin(userSig: String, success: @escaping ()->Void, failed: @escaping (_ error: String)->Void) {
V2TIMManager.sharedInstance()?.initSDK(Int32(SDKAPPID), config: nil, listener: nil)
guard let userID = curUserModel?.userId else {
failed("userID wrong")
return
}
let user = String(userID)
V2TIMManager.sharedInstance()?.login(user, userSig: userSig, succ: {
TUILogin.login(Int32(SDKAPPID), userID: user, userSig: userSig) {
debugPrint("login success")
V2TIMManager.sharedInstance()?.getUsersInfo([userID], succ: { [weak self] (infos) in
guard let `self` = self else { return }
Expand All @@ -129,12 +129,10 @@ import ImSDK_Plus
failed(err ?? "")
debugPrint("get user info failed, code:\(code), error: \(err ?? "nil")")
})


}, fail: { (code, errorDes) in
} fail: { (code, errorDes) in
failed(errorDes ?? "")
debugPrint("login failed, code:\(code), error: \(errorDes ?? "nil")")
})
}
}

@objc func curUserID() -> String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import Toast_Swift
import WebKit
import ImSDK_Plus
import TUICore

class TRTCLoginViewController: UIViewController {

Expand Down Expand Up @@ -75,8 +75,7 @@ class TRTCLoginViewController: UIViewController {
func loginIM(complete: @escaping (_ success: Bool)->Void) {
guard let userID = ProfileManager.shared.curUserID() else { return }
let userSig = ProfileManager.shared.curUserSig()
V2TIMManager.sharedInstance()
if V2TIMManager.sharedInstance()?.getLoginUser() != userID {
if TUILogin.getUserID() != userID {
ProfileManager.shared.IMLogin(userSig: userSig) {
debugPrint("IM login success.")
complete(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit

class UserAgreementViewController: UIViewController {
static let UserAgreeKey = "UserAgreeKey" // 用户协议,登录或注册后第一次弹出
static let UserAgreeKey = "UserAgreeKey"

typealias Completion = () -> Void
var completion: Completion? = nil
Expand Down
19 changes: 19 additions & 0 deletions iOS/Example/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'TUIChatSalonApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'TXAppBasic', :path => "../TXAppBasic/"
pod 'TXLiteAVSDK_TRTC'
pod 'TUIChatSalon', :path => "../", :subspecs => ["TRTC"]

end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions iOS/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2022 Tencent.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
11 changes: 0 additions & 11 deletions iOS/Podfile

This file was deleted.

58 changes: 0 additions & 58 deletions iOS/Podfile.lock

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "report.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "report@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "report@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TRTCChatSalon

Created by adams on 2021/5/13.

Copyright © 2022 Tencent. All rights reserved.
*/

"Demo.TRTC.Salon.welcome" = "Welcome";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TRTCChatSalon

Created by adams on 2021/5/13.

Copyright © 2022 Tencent. All rights reserved.
*/

"Demo.TRTC.Salon.welcome" = "欢迎";
Expand Down
13 changes: 13 additions & 0 deletions iOS/Source/TUIChatSalonKit_Professional/TUIChatSalonKit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// TUIChatSalonKit.h
// Pods
//
// Created by gg on 2021/5/18.
// Copyright © 2022 Tencent. All rights reserved.

#ifndef TUIChatSalonKit_h
#define TUIChatSalonKit_h

@import TXLiteAVSDK_Professional;

#endif /* TUIChatSalonKit_h */
2 changes: 1 addition & 1 deletion iOS/Source/localized/ChatSalonLocalized.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Pods
//
// Created by abyyxwang on 2021/5/6.
//
// Copyright © 2022 Tencent. All rights reserved.

#import <Foundation/Foundation.h>

Expand Down
2 changes: 1 addition & 1 deletion iOS/Source/localized/ChatSalonLocalized.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Pods
//
// Created by abyyxwang on 2021/5/6.
//
// Copyright © 2022 Tencent. All rights reserved.

#import "ChatSalonLocalized.h"

Expand Down
3 changes: 3 additions & 0 deletions iOS/Source/model/Impl/chatsalon/TXChatSalonService.m
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ - (void)destroyRoom:(TXCallback)callback {
[self unInitIMListener];
[self cleanRoomStatus];
} else {
[self unInitIMListener];
[self cleanRoomStatus];
if (callback) {
callback(code, desc ?: @"destroy room failed");
}
Expand Down Expand Up @@ -799,6 +801,7 @@ - (void)onGroupDismissed:(NSString *)groupID opUser:(V2TIMGroupMemberInfo *)opUs
if (![groupID isEqualToString:self.mRoomId]) {
return;
}
[self unInitIMListener];
[self cleanRoomStatus];
if ([self canDelegateResponseMethod:@selector(onRoomDestroyWithRoomId:)]) {
[self.delegate onRoomDestroyWithRoomId:groupID];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// TRTCChatSalonDemo
//
// Created by abyyxwang on 2020/6/8.
//Copyright © 2020 tencent. All rights reserved.
// Copyright © 2020 tencent. All rights reserved.
//
import UIKit
import TXAppBasic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// TRTCChatSalonDemo
//
// Created by abyyxwang on 2020/6/8.
//Copyright © 2020 tencent. All rights reserved.
// Copyright © 2020 tencent. All rights reserved.
//
import UIKit
import Kingfisher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// TRTCChatSalonDemo
//
// Created by abyyxwang on 2020/6/8.
//Copyright © 2020 tencent. All rights reserved.
// Copyright © 2020 tencent. All rights reserved.
//
import UIKit
import TXAppBasic
Expand Down
Loading