Skip to content

Commit

Permalink
[iOS] update version to relesse-9.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
noahcheng authored and AbySwifter committed Jan 23, 2022
1 parent 0dc8f0b commit 1eb613e
Show file tree
Hide file tree
Showing 1,700 changed files with 69,867 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
3CF1362A13F3BEB8D138DDF2 /* TXLiteAVSDK_Professional.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87DBF9D0C798B7CC854B837D /* TXLiteAVSDK_Professional.framework */; };
400C520226A67EE30036AC40 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 400C520126A67EE30036AC40 /* AssetsLibrary.framework */; };
40D550EC26A6A9D800FE9F13 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 40D550EB26A6A9BF00FE9F13 /* libsqlite3.0.tbd */; };
4723A7BF26315F920094AC81 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4723A7BE26315F920094AC81 /* OpenGLES.framework */; };
Expand Down Expand Up @@ -74,6 +73,8 @@
88FC7854268C8C2D00768C53 /* RTCPushAndPlayAnchorViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88FC7852268C8C2D00768C53 /* RTCPushAndPlayAnchorViewController.xib */; };
88FC7859268C8F6E00768C53 /* RTCPushAndPlayAudienceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88FC7857268C8F6E00768C53 /* RTCPushAndPlayAudienceViewController.m */; };
88FC785A268C8F6E00768C53 /* RTCPushAndPlayAudienceViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88FC7858268C8F6E00768C53 /* RTCPushAndPlayAudienceViewController.xib */; };
8944BB35B56E9F84A6CEDE84 /* TXLiteAVSDK_Professional.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC05F0D88F44886B70BA4C7D /* TXLiteAVSDK_Professional.framework */; };
B507745FFC8F3D6FA9C05DF6 /* TXLiteAVSDK_Professional.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC05F0D88F44886B70BA4C7D /* TXLiteAVSDK_Professional.framework */; };
C1937C64274F75F700F19E99 /* LivePkUserInputViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C1937C63274F75F700F19E99 /* LivePkUserInputViewController.m */; };
C1937C93274F799200F19E99 /* LiveLinkOrPkStreamInputViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C1937C84274F799200F19E99 /* LiveLinkOrPkStreamInputViewController.m */; };
C1937C94274F799200F19E99 /* LiveLinkOrPkSwitchRoleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C1937C85274F799200F19E99 /* LiveLinkOrPkSwitchRoleViewController.m */; };
Expand All @@ -86,7 +87,6 @@
C1937C9B274F799200F19E99 /* LiveLinkAnchorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C1937C90274F799200F19E99 /* LiveLinkAnchorViewController.m */; };
C1937C9C274F799200F19E99 /* LiveLinkAudienceViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C1937C92274F799200F19E99 /* LiveLinkAudienceViewController.xib */; };
C1937CBD275080CB00F19E99 /* LivePkFindPkUserController.m in Sources */ = {isa = PBXBuildFile; fileRef = C1937CBB275080CB00F19E99 /* LivePkFindPkUserController.m */; };
D485904CA4703C69721504AD /* TXLiteAVSDK_Professional.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87DBF9D0C798B7CC854B837D /* TXLiteAVSDK_Professional.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -162,7 +162,6 @@
47ECB9882626867C00201FCB /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
47ECB98B2626868400201FCB /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
47ECB98D2626868E00201FCB /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
87DBF9D0C798B7CC854B837D /* TXLiteAVSDK_Professional.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TXLiteAVSDK_Professional.framework; path = ../SDK/TXLiteAVSDK_Professional.framework; sourceTree = "<group>"; };
880B3C482624411B002683FB /* GenerateTestUserSig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GenerateTestUserSig.m; sourceTree = "<group>"; };
880B3C492624411B002683FB /* GenerateTestUserSig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenerateTestUserSig.h; sourceTree = "<group>"; };
88167CB0268488C2001D99DC /* LivePushCameraEnterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LivePushCameraEnterViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -217,6 +216,7 @@
88FC7856268C8F6E00768C53 /* RTCPushAndPlayAudienceViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCPushAndPlayAudienceViewController.h; sourceTree = "<group>"; };
88FC7857268C8F6E00768C53 /* RTCPushAndPlayAudienceViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RTCPushAndPlayAudienceViewController.m; sourceTree = "<group>"; };
88FC7858268C8F6E00768C53 /* RTCPushAndPlayAudienceViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RTCPushAndPlayAudienceViewController.xib; sourceTree = "<group>"; };
BC05F0D88F44886B70BA4C7D /* TXLiteAVSDK_Professional.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TXLiteAVSDK_Professional.framework; path = ../SDK/TXLiteAVSDK_Professional.framework; sourceTree = "<group>"; };
C1937C62274F75F700F19E99 /* LivePkUserInputViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LivePkUserInputViewController.h; sourceTree = "<group>"; };
C1937C63274F75F700F19E99 /* LivePkUserInputViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LivePkUserInputViewController.m; sourceTree = "<group>"; };
C1937C83274F799100F19E99 /* LiveLinkAnchorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveLinkAnchorViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -257,7 +257,7 @@
4723A7C526315FB10094AC81 /* libc++.tbd in Frameworks */,
47ECB9892626867C00201FCB /* libc++.tbd in Frameworks */,
4723A7C226315FA30094AC81 /* CoreMedia.framework in Frameworks */,
D485904CA4703C69721504AD /* TXLiteAVSDK_Professional.framework in Frameworks */,
B507745FFC8F3D6FA9C05DF6 /* TXLiteAVSDK_Professional.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -269,7 +269,7 @@
88A2C846267062FF006FC026 /* Accelerate.framework in Frameworks */,
8894458D26282AF800193FAD /* TXLiteAVSDK_ReplayKitExt.framework in Frameworks */,
8894456B26282A3200193FAD /* ReplayKit.framework in Frameworks */,
3CF1362A13F3BEB8D138DDF2 /* TXLiteAVSDK_Professional.framework in Frameworks */,
8944BB35B56E9F84A6CEDE84 /* TXLiteAVSDK_Professional.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -354,7 +354,7 @@
isa = PBXGroup;
children = (
889444FD262824EA00193FAD /* TXLiteAVSDK_ReplayKitExt.framework */,
87DBF9D0C798B7CC854B837D /* TXLiteAVSDK_Professional.framework */,
BC05F0D88F44886B70BA4C7D /* TXLiteAVSDK_Professional.framework */,
);
name = SDK;
path = ../SDK;
Expand Down
Empty file added iOS/XiaoZhiBo/.gitkeep
Empty file.
6 changes: 6 additions & 0 deletions iOS/XiaoZhiBo/APP/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Pods/TXCopyrightedMedia/TXCopyrightedMedia.framework/TXCopyrightedMedia filter=lfs diff=lfs merge=lfs -text
iOS/MLVB-APP-Source/TUIBeauty/Example/Pods/TXIMSDK_Plus_iOS/ImSDK_Plus.framework/ImSDK_Plus filter=lfs diff=lfs merge=lfs -text
iOS/MLVB-APP-Source/TUIPusher/Example/Pods/TXIMSDK_Plus_iOS/ImSDK_Plus.framework/ImSDK_Plus filter=lfs diff=lfs merge=lfs -text
iOS/MLVB-APP-Source/TUIPlayer/Example/Pods/TXIMSDK_Plus_iOS/ImSDK_Plus.framework/ImSDK_Plus filter=lfs diff=lfs merge=lfs -text
iOS/MLVB-APP-Source/APP/Pods/TXCopyrightedMedia/TXCopyrightedMedia.framework/TXCopyrightedMedia filter=lfs diff=lfs merge=lfs -text
iOS/MLVB-APP-Source/APP/Pods/TXIMSDK_Plus_iOS/ImSDK_Plus.framework/ImSDK_Plus filter=lfs diff=lfs merge=lfs -text
7 changes: 7 additions & 0 deletions iOS/XiaoZhiBo/APP/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
q*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate
139 changes: 139 additions & 0 deletions iOS/XiaoZhiBo/APP/App/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
//
// AppDelegate.swift
// TRTCScene
//
// Created by abyyxwang on 2021/3/24.
//

import UIKit
import TUIPusher
import TUICore
import Toast_Swift

/// 用户协议
let WEBURL_Agreement:String = "https://web.sdk.qcloud.com/document/Tencent-MLVB-User-Agreement.html"
/// 隐私协议
let WEBURL_Privacy:String = "https://web.sdk.qcloud.com/document/Tencent-MLVB-Privacy-Protection-Guidelines.html"

class AppDelegate: UIResponder, UIApplicationDelegate {

let kXiaoZhiBoAppId = "0"
var window: UIWindow?

func setLicence() {
V2TXLivePremier.setLicence(LICENSEURL, key: LICENSEURLKEY)
}

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
setLicence()
window = UIWindow(frame: UIScreen.main.bounds)
if let userModel = ProfileManager.sharedManager().currentUserModel {
UserOverdueLogicManager.sharedManager().userOverdueState = .alreadyLogged
let mainTabBarVC = MainTabbarController()
mainTabBarVC.view.backgroundColor = .white
window?.rootViewController = mainTabBarVC
window?.makeKeyAndVisible()
checkStoreVersion(appID: kXiaoZhiBoAppId)
HttpLogicRequest.userLoginToken(userId: userModel.userId, token: userModel.token, success: nil, failed: { _, _ in
UserOverdueLogicManager.sharedManager().userOverdueState = .loggedAndOverdue
})
} else {
let loginViewController = TRTCLoginViewController()
let naviVC = UINavigationController(rootViewController: loginViewController)
naviVC.view.backgroundColor = .white
window?.rootViewController = naviVC
}
setupNavigationBarAppearance()
window?.makeKeyAndVisible()
setToastDefaultPosition()
return true
}

private func setToastDefaultPosition() {
ToastManager.shared.position = .center
TUICSToastManager.setDefaultPosition("TUICSToastPositionCenter")
}

func setupNavigationBarAppearance() {
UIBarButtonItem.appearance().setBackButtonTitlePositionAdjustment(UIOffset(horizontal: -1000, vertical: 0), for: .default)
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18), NSAttributedString.Key.foregroundColor: UIColor.white]
UINavigationBar.appearance().setBackgroundImage(UIImage(named: "transparent"), for: .default)
UINavigationBar.appearance().shadowImage = UIImage()
}

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
AppUtils.shared.deviceToken = deviceToken
}

@objc public func showMainViewController() {
let mainTabBarVC = MainTabbarController()
mainTabBarVC.view.backgroundColor = .white
if let keyWindow = AppUtils.getCurrentWindow() {
keyWindow.rootViewController = mainTabBarVC
keyWindow.makeKeyAndVisible()
checkStoreVersion(appID: kXiaoZhiBoAppId)
} else {
debugPrint("window error")
}
}

@objc public func showLoginViewController() {
let loginVC = TRTCLoginViewController()
let nav = UINavigationController(rootViewController: loginVC)
if let keyWindow = AppUtils.getCurrentWindow() {
keyWindow.rootViewController = nav
keyWindow.makeKeyAndVisible()
} else {
debugPrint("window error")
}
}

func checkStoreVersion(appID: String) {
let urlStr = "https://itunes.apple.com/cn/lookup?id=" + appID
if let url = URL(string: urlStr) {
let urlRequest = URLRequest(url: url)
let dataTask = URLSession.shared.dataTask(with: urlRequest) { [weak self] data, _, _ in
guard let `self` = self else { return }
guard let data = data else { return }
guard let remoteDic = try? JSONSerialization.jsonObject(with: data, options: .mutableLeaves) as? [String: Any] else { return }
guard let array = remoteDic["results"] as? [Any] else { return }
guard let appInfo = array.first as? [String: Any] else { return }
guard let appStoreVersion = appInfo["version"] as? String else { return }
debugPrint("====== store version info: \(appStoreVersion) ======")
let result = self.compareVersion(appStoreVersion: appStoreVersion)
if result {
DispatchQueue.main.async {
self.showUpdateAlertController(appID: appID)
}
}
}
dataTask.resume()
}
}

func compareVersion(appStoreVersion: String) -> Bool {
let currentVersion = AppUtils.appVersion
print("====== current version is \(currentVersion) ======")
return appStoreVersion.compare(currentVersion, options: .numeric, range: nil, locale: nil) == .orderedDescending
}

func showUpdateAlertController(appID: String) {
let alertController = UIAlertController(title: LoginLocalize("Demo.TRTC.LiveRoom.prompt"), message: LoginLocalize("Demo.TRTC.Home.newversionpublic"), preferredStyle: .alert)
let sureAction = UIAlertAction(title: LoginLocalize("Demo.TRTC.Home.updatenow"), style: .default) { [weak self] _ in
guard let `self` = self else { return }
self.openAppStore(appID: appID)
}
let cancelAction = UIAlertAction(title: LoginLocalize("Demo.TRTC.Home.later"), style: .cancel, handler: nil)
alertController.addAction(sureAction)
alertController.addAction(cancelAction)
if let keyWindow = AppUtils.getCurrentWindow(), let rootViewController = keyWindow.rootViewController {
rootViewController.present(alertController, animated: true, completion: nil)
}
}

func openAppStore(appID: String) {
guard let url = URL(string: "https://itunes.apple.com/us/app/id\(appID)?ls=1&mt=8") else { return }
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
14 changes: 14 additions & 0 deletions iOS/XiaoZhiBo/APP/App/BridgeHeader/TRTCAPP-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// TRTCAPP-Bridging-Header.h
// TRTCAPP
//
// Created by adams on 2021/4/1.
//

#ifndef TRTCAPP_Bridging_Header_h
#define TRTCAPP_Bridging_Header_h

//#import <ImSDK_Plus.h>

#endif /* TRTCAPP_Bridging_Header_h */

8 changes: 8 additions & 0 deletions iOS/XiaoZhiBo/APP/App/Config.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>enableLiveRoomAdLink</key>
<true/>
</dict>
</plist>
60 changes: 60 additions & 0 deletions iOS/XiaoZhiBo/APP/App/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>小直播</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>9.5.0</string>
<key>CFBundleVersion</key>
<string>1453</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>腾讯云视立方小直播需要访问你的相机权限,以便能正常使用秀场直播画面预览,美颜等功能</string>
<key>NSMicrophoneUsageDescription</key>
<string>腾讯云视立方小直播需要访问你的麦克风权限,以便能正常使用秀场直播声音采集功能</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
49 changes: 49 additions & 0 deletions iOS/XiaoZhiBo/APP/App/MLVBConfigManager.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// MLVBConfigManager.swift
// XiaoZhiBoApp
//
// Created by jack on 2022/1/17.
//

import Foundation

class MLVBConfigManager {

static let shared: MLVBConfigManager = MLVBConfigManager()
/// 本地配置文件信息
var configInfo: [String: Any] = [:]

init() {
loadConfig()
}

}

// MARK: - Public 便利获取Config配置信息
extension MLVBConfigManager {
/// 是否支持直播间广告外链
public class func enableLiveRoomAdLink() -> Bool {
return (shared.configInfo["enableLiveRoomAdLink"] as? NSNumber)?.boolValue ?? false
}
}

// MARK: - Private
extension MLVBConfigManager {

/// 加载本地Config文件
private func loadConfig() {
let plistName: String = "Config"
guard let plistPath: String = Bundle.main.path(forResource: plistName, ofType: "plist") else {
return
}
guard let plistData = FileManager.default.contents(atPath: plistPath) else {
return
}
var propertyListFormat = PropertyListSerialization.PropertyListFormat.xml
guard let config = try? PropertyListSerialization.propertyList(from: plistData, options: .mutableContainersAndLeaves, format: &propertyListFormat) as? [String: Any] else {
return
}
configInfo = config
}

}
11 changes: 11 additions & 0 deletions iOS/XiaoZhiBo/APP/App/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Foundation
import UIKit

let userDefault = UserDefaults.standard
userDefault.removeObject(forKey: "AppleLanguages")
let langCultureCode: [String] = ["en-CN"]
let currentLanguage = userDefault.stringArray(forKey: "AppleLanguages")?.first ?? ""
if (!currentLanguage.contains("zh-")) {
userDefault.set(langCultureCode, forKey: "AppleLanguages")
}
UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, nil, NSStringFromClass(AppDelegate.self))
Loading

0 comments on commit 1eb613e

Please sign in to comment.