SentrySDK.start { options in
#if DEBUG
options.enabled = false
#else
options.enabled = true
#endif
if AppBundle.isReleasePackage() {
options.dsn = xxx
}else{
options.dsn = xxx
}
options.enableNetworkTracking = false
options.enableCaptureFailedRequests = false
options.sampleRate = 0.5
options.tracesSampleRate = 0.3
options.profilesSampleRate = 0.3
options.appHangTimeoutInterval = 3
options.beforeSend = { event in
if let type = event.exceptions?.first?.type,type == "App Hanging" {
if let frames = event.exceptions?.first?.stacktrace?.frames,
!frames.isEmpty {
for item in frames.reversed() {
guard let function = item.function else { continue }
if AppDelegate.containsSentryWhiteListedStrings(function){
return nil
}
}
}
}
return event
}
SentrySDK.configureScope { scope in
if let data:Data = ULog.shared.getActivityLog(){
scope.addAttachment(Attachment(data: data, filename: "crash.log"))
ULog.shared.removeAllActivityLog()
}
}
}
Platform
iOS
Environment
Production
Installed
Manually
Version
8.37.0
Xcode Version
15.1
Did it work on previous versions?
No response
Steps to Reproduce
Info from Xcode Organizer:
Expected Result
reduce app launch time
Actual Result
23% slow launch time
Are you willing to submit a PR?
No response