App Crash Reporter
AIBudsCrashReporter crash reports local रूप से capture करता है। Host app अगली launch पर उन्हें खोज सकता है, internal diagnostic flow में दिखा सकता है, अपने backend से upload कर सकता है और handling के बाद delete कर सकता है।
Module product consent, upload transport, retention या support access तय नहीं करता। ये host app की जिम्मेदारियाँ हैं।
App launches के बीच crash report lifecycle
Crash failing launch में capture होता है; report अगली app launch पर मिलती और product-controlled flow में handle होती है।
जल्दी install करें, अगली launch पर handle करें
Feature work से पहले application lifecycle में CrashReporterSDK एक बार install करें। Default path पर reports app की Documents directory में .aibuds/crash_logs के नीचे store होती हैं। स्पष्ट storage policy होने पर custom root path उपयोग किया जा सकता है।
पिछली launch crash हुई हो तो last-crash callback newest available path देता है। Report-list callback local list बदलने का संकेत देता है। कोई callback report upload या delete नहीं करता।
- Swift
- Objective-C
CrashReporterSDK.install(
withLastCrashReportCallback: { path in
guard let path else { return }
// Enqueue consent-aware inspection or upload outside this callback.
},
reportListUpdateCallback: {
// Refresh internal diagnostic state.
}
)[AIBudsCrashReporterSDK
installWithLastCrashReportCallback:^(NSString *_Nullable path) {
if (path == nil) {
return;
}
// Enqueue consent-aware inspection or upload outside this callback.
}
reportListUpdateCallback:^{
// Refresh internal diagnostic state.
}];All-in-One में module शामिल है, फिर भी installCrashReporter को स्पष्ट रूप से call करना आवश्यक है।
AI की सहायता से लागू करें
इस वर्कफ़्लो को AI से लागू करें
आधिकारिक “AIBuds क्रैश रिपोर्ट प्रबंधित करें” स्किल से वर्कफ़्लो को अपने ऐप के अनुसार लागू करें।
https://docs-aibuds.github.io/hi/skills/manage-aibuds-crash-reports को पढ़ें और निर्देशों का पालन करें। इस स्किल से “AIBuds क्रैश रिपोर्ट प्रबंधित करें” को इस iOS प्रोजेक्ट में लागू करें और परिणाम सत्यापित करें।Report की जिम्मेदारी
allCrashReportPaths() report paths newest-first लौटाता है। Report asynchronously पढ़ें या upload करें, operation की सफलता verify करें और फिर केवल उसी list से मिले path पर deleteCrashReport call करें।
Deletion में arbitrary filesystem path न दें। Retries idempotent रखें और backend acknowledgement या retention expiry तक report सुरक्षित रखें।
यूज़र की diagnostic जानकारी
setUserInfo(_:forKey:) में String, Int, UInt, Double, Bool और Date दिए जा सकते हैं; values key से हटाई जा सकती हैं। केवल कम cardinality वाला diagnostic context जोड़ें जिसे crash report में रखना सुरक्षित हो।
Access tokens, transcripts, audio, email addresses, पूरे device identifiers, precise location और अन्य personal data न जोड़ें। Session समाप्त होने पर session-scoped values हटाएँ, ताकि बाद के crash में पुराना context न जुड़े।
Privacy और Operations
- Collection और upload के लिए आवश्यक consent लें।
- Upload encrypt करें और support backend authenticate करें।
- Local और server-side access सीमित रखें।
- Maximum report age और disk usage तय करें।
- Trusted infrastructure पर matching build artifacts से symbolicate करें।
- Crash-report transport failures को application startup से अलग रखें।
- Production validation flow में जानबूझकर crash trigger न करें।
Validation checklist
- Installation जल्दी और केवल एक बार होती है।
- पिछली launch की reports startup-critical path के बाहर process होती हैं।
- Delete करने से पहले upload acknowledgement मिलता है।
- केवल enumerated report paths delete होते हैं।
- User info में secrets और sensitive content नहीं है।
- Invalid होने पर session-scoped metadata हटता है।
- Retention, consent, symbolication और backend access documented हैं।
- Release-build crash capture approved non-production scenario से test किया गया है।