mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
移除 CrashReporter
This commit is contained in:
parent
321a7e9e32
commit
9ca2577ad8
@ -1083,7 +1083,6 @@
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Bark/Pods-Bark-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.bundle",
|
||||
"${PODS_ROOT}/DropDown/DropDown/resources/DropDownCell.xib",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardCore/IQKeyboardCore.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardNotification/IQKeyboardNotification.bundle",
|
||||
@ -1097,7 +1096,6 @@
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/Material/com.cosmicmind.material.fonts.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/MercariQRScanner/QRScannerAssets.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper/Privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/PLCrashReporter/PLCrashReporter.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/Realm/realm_objc_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift/realm_swift_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa_Privacy.bundle",
|
||||
@ -1112,7 +1110,6 @@
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Alamofire.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CryptoSwift.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DeviceKit.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DropDownCell.nib",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQKeyboardCore.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQKeyboardNotification.bundle",
|
||||
@ -1126,7 +1123,6 @@
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/com.cosmicmind.material.fonts.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QRScannerAssets.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/PLCrashReporter.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/realm_objc_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/realm_swift_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RxCocoa_Privacy.bundle",
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
// Copyright © 2018年 Fin. All rights reserved.
|
||||
//
|
||||
|
||||
import CrashReporter
|
||||
import IQKeyboardManagerSwift
|
||||
import IQKeyboardToolbarManager
|
||||
import SwiftyStoreKit
|
||||
@ -20,60 +19,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
func setupRealm() {
|
||||
// Tell Realm to use this new configuration object for the default Realm
|
||||
Realm.Configuration.defaultConfiguration = kRealmDefaultConfiguration
|
||||
|
||||
// // iCloud 同步
|
||||
// syncEngine = SyncEngine(objects: [
|
||||
// SyncObject(type: Message.self)
|
||||
// ], databaseScope: .private)
|
||||
|
||||
|
||||
#if DEBUG
|
||||
let realm = try? Realm()
|
||||
print("message count: \(realm?.objects(Message.self).count ?? 0)")
|
||||
let realm = try? Realm()
|
||||
print("message count: \(realm?.objects(Message.self).count ?? 0)")
|
||||
#endif
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
self.window = UIWindow(frame: UIScreen.main.bounds)
|
||||
self.window?.backgroundColor = UIColor.black
|
||||
|
||||
#if !DEBUG
|
||||
let config = PLCrashReporterConfig(signalHandlerType: .mach, symbolicationStrategy: [])
|
||||
if let crashReporter = PLCrashReporter(configuration: config) {
|
||||
// Enable the Crash Reporter.
|
||||
do {
|
||||
try crashReporter.enableAndReturnError()
|
||||
} catch {
|
||||
print("Warning: Could not enable crash reporter: \(error)")
|
||||
}
|
||||
|
||||
if crashReporter.hasPendingCrashReport() {
|
||||
let reportController = CrashReportViewController()
|
||||
do {
|
||||
let data = try crashReporter.loadPendingCrashReportDataAndReturnError()
|
||||
|
||||
// Retrieving crash reporter data.
|
||||
let report = try PLCrashReport(data: data)
|
||||
|
||||
if let text = PLCrashReportTextFormatter.stringValue(for: report, with: PLCrashReportTextFormatiOS) {
|
||||
reportController.crashLog = text
|
||||
} else {
|
||||
print("CrashReporter: can't convert report to text")
|
||||
}
|
||||
} catch {
|
||||
print("CrashReporter failed to load and parse with error: \(error)")
|
||||
}
|
||||
|
||||
// Purge the report.
|
||||
crashReporter.purgePendingCrashReport()
|
||||
self.window?.rootViewController = reportController
|
||||
self.window?.makeKeyAndVisible()
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
print("Could not create an instance of PLCrashReporter")
|
||||
}
|
||||
#endif
|
||||
|
||||
// 必须在应用一开始就配置,否则应用可能提前在配置之前试用了 Realm() ,则会创建两个独立数据库。
|
||||
setupRealm()
|
||||
|
||||
|
||||
3
Podfile
3
Podfile
@ -8,13 +8,11 @@ use_modular_headers!
|
||||
def pods
|
||||
pod 'SnapKit'
|
||||
pod 'Material'
|
||||
pod 'KVOController'
|
||||
pod 'SVProgressHUD'
|
||||
pod 'FDFullscreenPopGesture'
|
||||
pod 'Moya/RxSwift'
|
||||
pod 'ObjectMapper'
|
||||
pod 'SwiftyJSON'
|
||||
pod 'DeviceKit'
|
||||
pod 'DefaultsKit'
|
||||
pod 'RealmSwift'
|
||||
pod 'CryptoSwift'
|
||||
@ -31,7 +29,6 @@ def pods
|
||||
pod 'MercariQRScanner', :git => 'https://github.com/Finb/QRScanner'
|
||||
pod 'DropDown'
|
||||
|
||||
pod 'PLCrashReporter'
|
||||
pod 'SwiftyStoreKit'
|
||||
end
|
||||
|
||||
|
||||
36
Podfile.lock
36
Podfile.lock
@ -1,8 +1,7 @@
|
||||
PODS:
|
||||
- Alamofire (5.10.2)
|
||||
- CryptoSwift (1.8.3)
|
||||
- CryptoSwift (1.8.4)
|
||||
- DefaultsKit (0.3.2)
|
||||
- DeviceKit (5.5.0)
|
||||
- Differentiator (5.0.0)
|
||||
- DropDown (2.3.13)
|
||||
- FDFullscreenPopGesture (1.1)
|
||||
@ -27,8 +26,7 @@ PODS:
|
||||
- IQTextInputViewNotification
|
||||
- IQTextInputViewNotification (1.0.8):
|
||||
- IQKeyboardCore
|
||||
- Kingfisher (8.1.2)
|
||||
- KVOController (1.2.0)
|
||||
- Kingfisher (8.1.3)
|
||||
- Material (3.1.8):
|
||||
- Material/Core (= 3.1.8)
|
||||
- Material/Core (3.1.8):
|
||||
@ -46,12 +44,11 @@ PODS:
|
||||
- "NSObject+Rx (5.2.2)":
|
||||
- RxSwift (~> 6.2)
|
||||
- ObjectMapper (4.4.2)
|
||||
- PLCrashReporter (1.11.2)
|
||||
- Realm (20.0.0):
|
||||
- Realm/Headers (= 20.0.0)
|
||||
- Realm/Headers (20.0.0)
|
||||
- RealmSwift (20.0.0):
|
||||
- Realm (= 20.0.0)
|
||||
- Realm (20.0.1):
|
||||
- Realm/Headers (= 20.0.1)
|
||||
- Realm/Headers (20.0.1)
|
||||
- RealmSwift (20.0.1):
|
||||
- Realm (= 20.0.1)
|
||||
- RxCocoa (6.8.0):
|
||||
- RxRelay (= 6.8.0)
|
||||
- RxSwift (= 6.8.0)
|
||||
@ -75,19 +72,16 @@ PODS:
|
||||
DEPENDENCIES:
|
||||
- CryptoSwift
|
||||
- DefaultsKit
|
||||
- DeviceKit
|
||||
- DropDown
|
||||
- FDFullscreenPopGesture
|
||||
- IQKeyboardManagerSwift/IQKeyboardToolbarManager
|
||||
- Kingfisher
|
||||
- KVOController
|
||||
- Material
|
||||
- MercariQRScanner (from `https://github.com/Finb/QRScanner`)
|
||||
- MJRefresh
|
||||
- Moya/RxSwift
|
||||
- "NSObject+Rx"
|
||||
- ObjectMapper
|
||||
- PLCrashReporter
|
||||
- RealmSwift
|
||||
- RxCocoa
|
||||
- RxDataSources
|
||||
@ -103,7 +97,6 @@ SPEC REPOS:
|
||||
- Alamofire
|
||||
- CryptoSwift
|
||||
- DefaultsKit
|
||||
- DeviceKit
|
||||
- Differentiator
|
||||
- DropDown
|
||||
- FDFullscreenPopGesture
|
||||
@ -114,14 +107,12 @@ SPEC REPOS:
|
||||
- IQKeyboardToolbarManager
|
||||
- IQTextInputViewNotification
|
||||
- Kingfisher
|
||||
- KVOController
|
||||
- Material
|
||||
- MJRefresh
|
||||
- Motion
|
||||
- Moya
|
||||
- "NSObject+Rx"
|
||||
- ObjectMapper
|
||||
- PLCrashReporter
|
||||
- Realm
|
||||
- RealmSwift
|
||||
- RxCocoa
|
||||
@ -145,9 +136,8 @@ CHECKOUT OPTIONS:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
|
||||
CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483
|
||||
CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90
|
||||
DefaultsKit: ff9b29089d6fc08651b81be2d2387bee6eb98b75
|
||||
DeviceKit: d83e38ca196a4ebf0cc5f37d6f0316a24b794d5b
|
||||
Differentiator: e8497ceab83c1b10ca233716d547b9af21b9344d
|
||||
DropDown: 8a2116376c1981888557f72ec2ffc9a5e0e456ec
|
||||
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
|
||||
@ -157,8 +147,7 @@ SPEC CHECKSUMS:
|
||||
IQKeyboardToolbar: d4bdccfb78324aec2f3920659c77bb89acd33312
|
||||
IQKeyboardToolbarManager: 6f4072ac620c2572d4af8c09f42a801f3e4909f7
|
||||
IQTextInputViewNotification: f5e954d8881fd9808b744e49e024cc0d4bcfe572
|
||||
Kingfisher: dc989619594e24713c83e5a98f89f08850e0c529
|
||||
KVOController: d72ace34afea42468329623b3379ab3cd1d286b6
|
||||
Kingfisher: f2af9028b16baf9dc6c07c570072bc41cbf009ef
|
||||
Material: a2a3f400a3b549d53ef89e56c58c4535b29db387
|
||||
MercariQRScanner: cd024685242f78fe40879cca9734bb7bb2fceb93
|
||||
MJRefresh: ff9e531227924c84ce459338414550a05d2aea78
|
||||
@ -166,9 +155,8 @@ SPEC CHECKSUMS:
|
||||
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
|
||||
"NSObject+Rx": 61cf1f7306a73dcef8b36649198af0813ec18dfd
|
||||
ObjectMapper: e6e4d91ff7f2861df7aecc536c92d8363f4c9677
|
||||
PLCrashReporter: 499c53b0104f95c302d94fd723ebb03c56d9bac8
|
||||
Realm: a799b5f9145623fb0bfe149fe81422863631dd0f
|
||||
RealmSwift: f8c4354ebd5053343e6ab9f4eda244145308a51e
|
||||
Realm: 9572204903ef28caeb3c03bb30c1147f354ee3e7
|
||||
RealmSwift: d230b44017a55a1ba97de6a944da1fe3bedb92b5
|
||||
RxCocoa: 2d33c1e1e5d66492052ad46b11024ae287572880
|
||||
RxDataSources: aa47cc1ed6c500fa0dfecac5c979b723542d79cf
|
||||
RxGesture: f3efb47ed2d26a8082f7b660d4a59970e275a7f8
|
||||
@ -179,6 +167,6 @@ SPEC CHECKSUMS:
|
||||
SwiftyJSON: f5b1bf1cd8dd53cd25887ac0eabcfd92301c6a5a
|
||||
SwiftyStoreKit: 6b9c08810269f030586dac1fae8e75871a82e84a
|
||||
|
||||
PODFILE CHECKSUM: e499f90151cf50309319d3c7295e7cb0541725ef
|
||||
PODFILE CHECKSUM: a7da3cf53c17d876cd2e822046dc7499c69fe470
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user