Total rebrand across KMM project: - Kotlin package: com.example.casera -> com.tt.honeyDue (dirs + declarations) - Gradle: rootProject.name, namespace, applicationId - Android: manifest, strings.xml (all languages), widget resources - iOS: pbxproj bundle IDs, Info.plist, entitlements, xcconfig - iOS directories: Casera/ -> HoneyDue/, CaseraTests/ -> HoneyDueTests/, etc. - Swift source: all class/struct/enum renames - Deep links: casera:// -> honeydue://, .casera -> .honeydue - App icons replaced with honeyDue honeycomb icon - Domains: casera.treytartt.com -> honeyDue.treytartt.com - Bundle IDs: com.tt.casera -> com.tt.honeyDue - Database table names preserved Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.3 KiB
Markdown
41 lines
1.3 KiB
Markdown
# Error Handling Guide
|
|
|
|
This guide explains how to implement consistent error handling with retry/cancel dialogs across Android and iOS apps.
|
|
|
|
## Android (Compose)
|
|
|
|
### Components Available
|
|
|
|
1. **ErrorDialog** - Reusable Material3 AlertDialog with retry/cancel buttons
|
|
2. **ApiResultHandler** - Composable that automatically handles ApiResult states
|
|
3. **HandleErrors()** - Extension function for ApiResult states
|
|
|
|
### Usage Examples
|
|
|
|
See full documentation in the file for complete examples of:
|
|
- Using ApiResultHandler for data loading screens
|
|
- Using HandleErrors() extension for create/update/delete operations
|
|
- Using ErrorDialog directly for custom scenarios
|
|
|
|
## iOS (SwiftUI)
|
|
|
|
### Components Available
|
|
|
|
1. **ErrorAlertModifier** - View modifier that shows error alerts
|
|
2. **ViewStateHandler** - View that handles loading/error/success states
|
|
3. **handleErrors()** - View extension for automatic error monitoring
|
|
|
|
### Usage Examples
|
|
|
|
See full documentation for examples of each approach.
|
|
|
|
## Files Reference
|
|
|
|
**Android:**
|
|
- `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ErrorDialog.kt`
|
|
- `composeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ApiResultHandler.kt`
|
|
|
|
**iOS:**
|
|
- `iosApp/iosApp/Helpers/ErrorAlertModifier.swift`
|
|
- `iosApp/iosApp/Helpers/ViewStateHandler.swift`
|