Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: KSCrash.m (341): -[KSCrash sendAllReportsWithCompletion:]_block_invoke: Failed to send reports: Error Domain=KSCrashReportSinkEMail Code=0 "E-Mail not enabled on device" UserInfo={NSLocalizedDescription=E-Mail not enabled on device} Printing description of error: #418

Open
ChinaKeep opened this issue Oct 13, 2021 · 0 comments

Comments

@ChinaKeep
Copy link

func crashReport() {
let emailAddress = "[email protected]"
let emailCrash = KSCrashInstallationEmail.sharedInstance()
emailCrash?.recipients = [emailAddress]
emailCrash?.subject = "Crash Report"
emailCrash?.message = "This is a crash report"
emailCrash?.filenameFmt = "crash-report-bugs.txt.gz"
emailCrash?.setReportStyle(KSCrashEmailReportStyleJSON, useDefaultFilenameFormat: true)
emailCrash?.install()
//奔溃报告发送后,如何处理旧奔溃
KSCrash.sharedInstance().deleteBehaviorAfterSendAll = KSCDeleteNever
//发送奔溃报告
DispatchQueue.main.async {
//刷新UI的代码放到主线程执行
emailCrash?.sendAllReports(completion: { reports, completed, error in
if completed {
debugLog("Send (String(describing: reports?.count)) reports")
}else{
debugLog("Failed to send reprots:(String(describing: error))")
}
})
}
}
failed why??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant