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>
1.3 KiB
1.3 KiB
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
- ErrorDialog - Reusable Material3 AlertDialog with retry/cancel buttons
- ApiResultHandler - Composable that automatically handles ApiResult states
- 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
- ErrorAlertModifier - View modifier that shows error alerts
- ViewStateHandler - View that handles loading/error/success states
- 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.ktcomposeApp/src/commonMain/kotlin/com/example/honeydue/ui/components/ApiResultHandler.kt
iOS:
iosApp/iosApp/Helpers/ErrorAlertModifier.swiftiosApp/iosApp/Helpers/ViewStateHandler.swift