Commit 0c2a3699e2a5afb81fc3f5f1a2c9633ef6d45643
1 parent
1d6ef251
配置APM监控SDK
Showing
3 changed files
with
28 additions
and
4 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -2132,7 +2132,8 @@ | @@ -2132,7 +2132,8 @@ | ||
| 2132 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; | 2132 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2133 | CODE_SIGN_IDENTITY = "Apple Development"; | 2133 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2134 | CODE_SIGN_STYLE = Automatic; | 2134 | CODE_SIGN_STYLE = Automatic; |
| 2135 | - CURRENT_PROJECT_VERSION = 1.0.9.24.03.27.15; | 2135 | + CURRENT_PROJECT_VERSION = 1.0.9.24.03.29.15; |
| 2136 | + DEBUG_INFORMATION_FORMAT = dwarf; | ||
| 2136 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2137 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2137 | ENABLE_BITCODE = NO; | 2138 | ENABLE_BITCODE = NO; |
| 2138 | ENABLE_MODULE_VERIFIER = NO; | 2139 | ENABLE_MODULE_VERIFIER = NO; |
| @@ -2386,7 +2387,7 @@ | @@ -2386,7 +2387,7 @@ | ||
| 2386 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; | 2387 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2387 | CODE_SIGN_IDENTITY = "Apple Development"; | 2388 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2388 | CODE_SIGN_STYLE = Automatic; | 2389 | CODE_SIGN_STYLE = Automatic; |
| 2389 | - CURRENT_PROJECT_VERSION = 1.0.9.24.03.27.15; | 2390 | + CURRENT_PROJECT_VERSION = 1.0.9.24.03.29.15; |
| 2390 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2391 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2391 | ENABLE_BITCODE = NO; | 2392 | ENABLE_BITCODE = NO; |
| 2392 | ENABLE_MODULE_VERIFIER = NO; | 2393 | ENABLE_MODULE_VERIFIER = NO; |
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
| @@ -9,6 +9,7 @@ import Foundation | @@ -9,6 +9,7 @@ import Foundation | ||
| 9 | import UIKit | 9 | import UIKit |
| 10 | import SwiftGifOrigin | 10 | import SwiftGifOrigin |
| 11 | import CNLiveRequestBastKit | 11 | import CNLiveRequestBastKit |
| 12 | +import RangersAPM | ||
| 12 | 13 | ||
| 13 | let Width: CGFloat = UIScreen.main.bounds.size.width | 14 | let Width: CGFloat = UIScreen.main.bounds.size.width |
| 14 | let Height: CGFloat = UIScreen.main.bounds.size.height | 15 | let Height: CGFloat = UIScreen.main.bounds.size.height |
| @@ -192,10 +193,27 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -192,10 +193,27 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 192 | return backgroupView | 193 | return backgroupView |
| 193 | }() | 194 | }() |
| 194 | 195 | ||
| 196 | + func testAPM(){ | ||
| 197 | + | ||
| 198 | +// DispatchQueue.main.async { | ||
| 199 | +// // 执行一个耗时的操作,比如大数据量的循环或计算 | ||
| 200 | +// for i in 0..<10000000 { | ||
| 201 | +// // ... | ||
| 202 | +// print(i) | ||
| 203 | +// } | ||
| 204 | +// } | ||
| 205 | + | ||
| 206 | +// let optionalNumber: Int? = nil | ||
| 207 | +// let number = optionalNumber! // 强制解包nil值会导致崩溃 | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + | ||
| 195 | //MARK: 生命周期方法 | 211 | //MARK: 生命周期方法 |
| 196 | override func viewDidLoad() { | 212 | override func viewDidLoad() { |
| 197 | super.viewDidLoad() | 213 | super.viewDidLoad() |
| 198 | 214 | ||
| 215 | +// self.testAPM() | ||
| 216 | + | ||
| 199 | self.tabBarY = (self.tabBarController?.tabBar.top)! | 217 | self.tabBarY = (self.tabBarController?.tabBar.top)! |
| 200 | 218 | ||
| 201 | self.getUserIdentityApi() | 219 | self.getUserIdentityApi() |
| @@ -226,8 +244,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -226,8 +244,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 226 | override func viewWillAppear(_ animated: Bool) { | 244 | override func viewWillAppear(_ animated: Bool) { |
| 227 | super.viewWillAppear(animated) | 245 | super.viewWillAppear(animated) |
| 228 | // print("uid = ",UserInfoManager.shared.userInfo.uid) | 246 | // print("uid = ",UserInfoManager.shared.userInfo.uid) |
| 229 | - | ||
| 230 | } | 247 | } |
| 248 | + | ||
| 231 | override func viewDidAppear(_ animated: Bool) { | 249 | override func viewDidAppear(_ animated: Bool) { |
| 232 | super.viewDidAppear(animated) | 250 | super.viewDidAppear(animated) |
| 233 | self.view.height = KSreenHeight | 251 | self.view.height = KSreenHeight |
metaCode/Classes/Other/AppDelegate.swift
| @@ -52,12 +52,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | @@ -52,12 +52,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | ||
| 52 | apmConfig.channel = "App Store" | 52 | apmConfig.channel = "App Store" |
| 53 | apmConfig.deviceIDSource = .fromAPMService | 53 | apmConfig.deviceIDSource = .fromAPMService |
| 54 | apmConfig.defaultMonitors = .apmCrashMonitorSwitch | 54 | apmConfig.defaultMonitors = .apmCrashMonitorSwitch |
| 55 | - RangersAPM.start(with: apmConfig) | ||
| 56 | RangersAPM.setUserID(is_login ? UserInfoManager.shared.userInfo.uid : "userID") | 55 | RangersAPM.setUserID(is_login ? UserInfoManager.shared.userInfo.uid : "userID") |
| 56 | + RangersAPM.allowDebugLog { log in | ||
| 57 | + print("APMPlus : %@",log) | ||
| 58 | + } | ||
| 59 | + RangersAPM.start(with: apmConfig) | ||
| 60 | + | ||
| 57 | 61 | ||
| 58 | AppDelegate_configRequestManager() | 62 | AppDelegate_configRequestManager() |
| 59 | AppDelegate_configIQKeyboardManager() | 63 | AppDelegate_configIQKeyboardManager() |
| 60 | 64 | ||
| 65 | + //认证-下滑原生页数据库 | ||
| 61 | let databasePath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! | 66 | let databasePath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! |
| 62 | let filePath = "\(databasePath)/CNLiveDownSlideModelDataBase.db" | 67 | let filePath = "\(databasePath)/CNLiveDownSlideModelDataBase.db" |
| 63 | let databaseManager = DatabaseManager(filePath: filePath) | 68 | let databaseManager = DatabaseManager(filePath: filePath) |