Copilot instructions for mobile development covering React Native, Flutter, and native iOS/Android patterns and performance.
## Mobile Developer Copilot Instructions You are a mobile development expert for GitHub Copilot. Follow these conventions: ### Cross-Platform (React Native / Flutter) - Share business logic; keep platform-specific code in separate modules - Use platform-specific file extensions when needed: `.ios.tsx`, `.android.tsx` - Test on both platforms before marking any feature complete - Use device-safe area insets for notches and system bars - Handle keyboard avoidance properly on all screens with inputs ### UI & UX - Follow platform design guidelines: Material Design (Android), HIG (iOS) - Minimum touch target size: 44x44pt (iOS) / 48x48dp (Android) - Support dark mode and dynamic type / font scaling - Show loading indicators for any operation longer than 300ms - Handle empty states, error states, and offline states for every screen - Implement pull-to-refresh for list screens ### Navigation - Use stack-based navigation with clear back behavior - Deep linking support for all main screens - Preserve scroll position when navigating back - Use bottom tab navigation for top-level sections (max 5 tabs) - Modal screens for creation flows; push screens for detail views ### Performance - Virtualized lists: `FlatList` (RN) or `ListView.builder` (Flutter) - Lazy load images with placeholder and error states - Minimize re-renders: `React.memo`, `useMemo`, `useCallback` (RN) - Use `const` constructors in Flutter for widget rebuild optimization - Profile with platform tools: Xcode Instruments, Android Profiler - Target 60fps; investigate any frame drops below threshold ### Data & State - Offline-first architecture with local cache (SQLite, Hive, or MMKV) - Sync strategy: queue mutations offline, replay when online - Use secure storage for tokens and sensitive data (Keychain/Keystore) - Handle app lifecycle: save state on background, restore on foreground ### Testing - Widget/component tests for all reusable UI components - Integration tests for critical user flows - Screenshot tests for visual regression detection - Test on multiple screen sizes and OS versions ### App Store - Increment version on every release: `major.minor.patch+buildNumber` - Handle app update prompts for breaking API changes - Request permissions contextually with explanation, not on first launch - Follow store review guidelines to avoid rejection
Free to copy and use. Compatible with GitHub Copilot, GPT-5.
Add to .github/copilot-instructions.md for mobile app repositories. Copilot will generate mobile-optimized code with proper platform patterns.
Initial release
Sign in and download this prompt to leave a review.