Commit 0c2a3699e2a5afb81fc3f5f1a2c9633ef6d45643

Authored by “张旭”
1 parent 1d6ef251

配置APM监控SDK

metaCode.xcodeproj/project.pbxproj
... ... @@ -2132,7 +2132,8 @@
2132 2132 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
2133 2133 CODE_SIGN_IDENTITY = "Apple Development";
2134 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 2137 DEVELOPMENT_TEAM = 94X49GG3ZW;
2137 2138 ENABLE_BITCODE = NO;
2138 2139 ENABLE_MODULE_VERIFIER = NO;
... ... @@ -2386,7 +2387,7 @@
2386 2387 CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements;
2387 2388 CODE_SIGN_IDENTITY = "Apple Development";
2388 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 2391 DEVELOPMENT_TEAM = 94X49GG3ZW;
2391 2392 ENABLE_BITCODE = NO;
2392 2393 ENABLE_MODULE_VERIFIER = NO;
... ...
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
... ... @@ -9,6 +9,7 @@ import Foundation
9 9 import UIKit
10 10 import SwiftGifOrigin
11 11 import CNLiveRequestBastKit
  12 +import RangersAPM
12 13  
13 14 let Width: CGFloat = UIScreen.main.bounds.size.width
14 15 let Height: CGFloat = UIScreen.main.bounds.size.height
... ... @@ -192,10 +193,27 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
192 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 211 //MARK: 生命周期方法
196 212 override func viewDidLoad() {
197 213 super.viewDidLoad()
198 214  
  215 +// self.testAPM()
  216 +
199 217 self.tabBarY = (self.tabBarController?.tabBar.top)!
200 218  
201 219 self.getUserIdentityApi()
... ... @@ -226,8 +244,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
226 244 override func viewWillAppear(_ animated: Bool) {
227 245 super.viewWillAppear(animated)
228 246 // print("uid = ",UserInfoManager.shared.userInfo.uid)
229   -
230 247 }
  248 +
231 249 override func viewDidAppear(_ animated: Bool) {
232 250 super.viewDidAppear(animated)
233 251 self.view.height = KSreenHeight
... ...
metaCode/Classes/Other/AppDelegate.swift
... ... @@ -52,12 +52,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
52 52 apmConfig.channel = "App Store"
53 53 apmConfig.deviceIDSource = .fromAPMService
54 54 apmConfig.defaultMonitors = .apmCrashMonitorSwitch
55   - RangersAPM.start(with: apmConfig)
56 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 62 AppDelegate_configRequestManager()
59 63 AppDelegate_configIQKeyboardManager()
60 64  
  65 + //认证-下滑原生页数据库
61 66 let databasePath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first!
62 67 let filePath = "\(databasePath)/CNLiveDownSlideModelDataBase.db"
63 68 let databaseManager = DatabaseManager(filePath: filePath)
... ...