-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] update version to relesse-9.5.0
- Loading branch information
1 parent
0dc8f0b
commit 1eb613e
Showing
1,700 changed files
with
69,867 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
14
iOS/XiaoZhiBo/APP/App/BridgeHeader/TRTCAPP-Bridging-Header.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
Oops, something went wrong.