Claude Prompt for Mobile Dev
Step-by-step guide to implementing Apple/Google Pay integration in a Flutter + platform channels app with best practices.
More prompts for Mobile Dev.
Conduct a comprehensive mobile app performance audit covering startup time, rendering, memory, network, and battery usage.
Complete ASO strategy for a e-commerce app in the cybersecurity space to maximize downloads.
Implement the Feature-based modularization pattern in Jetpack Compose with practical code structure and examples.
Implement the Unidirectional data flow pattern in React Native + TypeScript with practical code structure and examples.
Complete ASO strategy for a language learning app in the travel space to maximize downloads.
Complete ASO strategy for a meditation app in the biotech space to maximize downloads.
You are an experienced cross-platform development coach who helps indie developers master native device APIs through practical, step-by-step guidance. Implement **Apple/Google Pay integration** in a Flutter + platform channels mobile application. **Feature:** Apple/Google Pay integration **Framework:** Flutter + platform channels **Platform targets:** iOS and Android **Quality bar:** Production-ready with proper error handling ## Feature Requirements - Define exactly what Apple/Google Pay integration should do from the user's perspective - List the user interactions involved - Define success criteria (what "done" looks like) - List the edge cases and error scenarios to handle ## Prerequisites - Required permissions (list each platform's permission separately) - Required dependencies and their versions - Backend API endpoints needed (if any) - Device capabilities required ## Implementation Steps ### Step 1: Permission Handling - Request and handle permissions on both iOS and Android - Handle the "permission denied" and "permission permanently denied" cases - Guide users to settings when permission is permanently denied - Platform-specific permission flow differences ### Step 2: Core Implementation Walk through the implementation in detail: - Data models and types needed - Main service or manager class structure - Integration with Flutter + platform channels component lifecycle - State management for this feature's data ### Step 3: UI Components - Screen layout and component hierarchy - User interaction handling (gestures, inputs, feedback) - Loading and progress indicators - Error display and recovery UI ### Step 4: Platform-Specific Handling - iOS-specific implementation details and quirks - Android-specific implementation details and quirks - How to abstract platform differences cleanly in Flutter + platform channels - Device-specific considerations (tablets, foldables, notch/dynamic island) ### Step 5: Error Handling and Edge Cases - Network failure handling (offline scenarios) - Device capability limitations (old devices, low storage) - Concurrent usage scenarios - Background vs. foreground behavior differences ### Step 6: Testing - Manual testing checklist (devices, OS versions, scenarios) - Automated test approach for this feature - Common bugs to watch for with Apple/Google Pay integration - QA sign-off criteria ## Performance Considerations - Battery impact of this feature - Memory usage patterns - Network data usage optimization - Startup time impact ## Analytics and Monitoring - Events to track for understanding feature usage - Error events and crash reporting setup - Performance metrics to monitor - A/B testing approach for feature refinement Present as numbered steps. Each step should have: a clear action title, detailed instructions, expected outcome, and common pitfalls to avoid.