20 ready-to-use ChatGPT prompts for mobile app development. Fill in the bracketed fields, paste into ChatGPT, and go.
Engineering · 20 prompts
01
Set Up a React Native Project with Expo for a Real Delivery Workflow
Create a guide for setting up an Expo-based React Native project with sensible project structure, environment setup, device testing flow, and platform-specific considerations.
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: project structure that mixes Expo-managed and bare-workflow assumptions, causing confusing errors when a native module is needed later, environment config like API URLs and keys hardcoded instead of separated per build profile, device testing done only on one platform so platform-specific issues surface late, and no plan for when the project needs to eject or use a config plugin for a native capability Expo doesn't support out of the box.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Project structure and workflow decisions
- Environment/config separation per build profile
- Cross-platform device testing plan
- Native-capability escape hatch plan
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
02
Integrate Firebase Authentication in a Mobile App with Provider and Session Decisions
Write an implementation guide for mobile Firebase authentication covering provider setup, session persistence, auth state handling, and UI flow decisions.
You are a senior mobile engineer advising on a real Firebase authentication implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it (provider setup, auth state listener, then UI wiring).
2. Tailor the guidance to the stated framework, providers, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break mobile Firebase auth: account-linking conflicts when the same email signs in through two providers, auth-state races on cold start before Firebase resolves the cached session, token refresh across app backgrounding/foregrounding, and platform-specific persistence gaps (iOS Keychain vs Android Keystore behavior after reinstall).
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Provider setup and configuration decisions
- Auth state and session persistence handling
- Account-linking and multi-provider conflict handling
- Error and edge-case UX (network loss, expired token, linking conflict)
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the framework, providers, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific mobile auth failure modes above rather than generic "security best practices" language.
- Make the advice usable by a mobile team shipping real work.
03
Plan a To-Do List Mobile App
Plan a to-do list mobile app with local storage, push notifications, and a realistic feature scope.
You’ll needplatformfeature scopestackconstraints
Prompt
You are a senior mobile app development architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: local storage schema designed with no migration plan, so a future feature addition breaks existing users' saved data, push notifications scoped without considering permission-denial rates and the fallback experience for users who decline, feature scope left open-ended without a v1 cut line, risking a never-shipped app, and no plan for what data syncs across devices versus what stays local-only.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
04
Build a Flutter REST Data Fetching Layer with Error and Loading States
Generate Flutter code for a REST data fetching layer that handles request state, parsing, failures, and UI integration without collapsing into a single fragile function.
You are a senior mobile engineer.
Produce code or a code scaffold for a Flutter REST data-fetching layer.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: loading and error states modeled as booleans instead of a proper state machine, causing impossible combinations like loading-and-error at once, no timeout handling so a hung request leaves the UI stuck in a loading state indefinitely, JSON parsing errors treated as string data instead of surfaced as a distinct failure state, and no retry or cancellation handling for a request that's superseded by a newer one.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (including timeout and superseded-request handling)
- Integration notes and assumptions
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.
05
Debug a Mobile App Camera Crash
Diagnose why a mobile app crashes when accessing the camera and propose fixes.
You are a senior mobile app development debugging assistant working on a real production issue.
Diagnose and improve the technical issue below.
Context:
- Problem description: [problem]
- Stack or environment: [stack]
- Current system role or production impact: [system role]
- Expected behavior: [expected]
- Actual behavior: [actual]
- Relevant code, logs, traces, metrics, or signals: [evidence]
Instructions:
1. Check first for the causes that actually produce this class of bug: camera permission not actually confirmed granted before the camera API is invoked, causing a crash instead of a graceful denial path, camera resources not released when the component unmounts or the app backgrounds, causing a resource conflict on the next open, a crash that only reproduces on specific device/OS combinations due to camera hardware API differences, and no crash-reporting breadcrumbs around the camera lifecycle, making the root cause hard to pin down from a stack trace alone.
2. Explain the debugging path in priority order based on risk, probability, and speed of confirmation.
3. Recommend fixes, mitigations, or containment steps and when each is appropriate.
4. Include how to validate the fix and what to monitor after rollout.
5. Keep the answer concise, operational, and biased toward restoring reliability.
Output format:
- Likely root causes (checked against the failure modes above)
- Highest-priority diagnostic steps
- Fix or containment options
- Validation and post-fix monitoring
- Main assumptions or risks
Missing information policy:
Ask up to 2 concise questions only if the stack, production impact, or failure mode is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prioritize root cause over guesswork.
- Name the specific failure modes above rather than generic debugging advice.
- Explain how to verify the fix.
- Include the operational reality of shipping the change safely.
06
Implement Offline Functionality in React Native with Sync and Conflict Considerations
Generate a React Native offline-first code structure that covers local persistence, queued mutations, reconnect sync behavior, and conflict-sensitive data flow.
You’ll needdata modelsync needsredux or state setupconflict tolerancenetwork assumptionsconstraints
Prompt
You are a senior mobile engineer.
Produce code or a code scaffold for a React Native offline-first data layer.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: local persistence with no conflict-resolution strategy for when the same record is edited both offline and on the server, queued mutations replayed in the wrong order after reconnect, corrupting the final state, no handling for a mutation that fails permanently rather than just being retriable and gets stuck retrying forever, and local storage size not bounded, so long offline periods can fill device storage.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (including conflict-resolution scenarios)
- Integration notes and assumptions
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.
07
Use Expo Push Notifications in a Mobile App
Implement push notifications in an Expo app with token handling, permissions, and delivery flow.
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: a push token requested and stored with no handling for a user later revoking notification permission, no handling for a token that changes on reinstall or device change, leaving notifications silently undelivered, a notification payload assumed to behave the same in foreground and background when OS behavior actually differs, and no fallback or retry logic for failed delivery, so notifications silently disappear with no visibility.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Token lifecycle and permission-change handling
- Foreground vs background delivery behavior
- Retry/fallback for failed delivery
- Visibility into delivery success
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
08
Integrate Google Maps into a Mobile App with Markers, Permissions, and Location States
Create a step-by-step guide for mobile Google Maps integration that covers SDK setup, permission handling, markers, user location, and degraded location states.
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: location permission requested with no explanation shown to the user first, leading to a high denial rate, map markers rendered without clustering at scale, making the map unusable with more than a handful of points, no handling for the user denying location permission beyond a silent blank map, and API key restrictions left too permissive or too strict without testing both platforms.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Permission request UX and denial handling
- Marker clustering at scale
- Degraded-state behavior without location
- API key restriction verification per platform
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
09
Plan Dark Mode in a Flutter App
Write a plan for implementing dark mode in Flutter using ThemeData and adaptive widgets.
You are a senior mobile app development architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: colors hardcoded in individual widgets instead of pulled from ThemeData, so dark mode requires touching every screen instead of one theme definition, system-theme-follows behavior not distinguished from an explicit user override so the two settings fight each other, images and icons with light-mode-only assets left unaddressed and looking broken in dark mode, and no persistence of the user's explicit theme choice across app restarts.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
10
Handle Background Tasks in a Mobile App
Develop a strategy for handling background tasks across Android and iOS.
You’ll needtask typeplatformsframeworkconstraints
Prompt
You are a senior mobile app development architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: background execution time budgets on iOS not accounted for, causing tasks to be silently killed mid-work, Android's battery-optimization and doze-mode restrictions not tested against, causing tasks to simply never run on some devices, no idempotency for a background task that might be triggered more than once by the OS, and no user-facing indication of background sync status, making failures invisible until data appears missing.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
11
Choose a Flutter State Management Strategy with Team, Lifecycle, and Testing Tradeoffs
Choose a Flutter state management strategy with Provider or Riverpod by weighing app complexity, state lifecycle, testability, and team-operating tradeoffs.
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: a state management approach chosen based on popularity rather than the app's actual state complexity and team familiarity, no plan for how state survives widget rebuilds versus actual app restarts, testability not considered until after the architecture is already built, making unit tests awkward to retrofit, and provider or Riverpod scope defined too globally, causing unrelated widgets to rebuild on unrelated state changes.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- State-management choice justified by complexity and team fit
- Widget-rebuild vs app-restart state survival
- Testability designed in from the start
- Scoped providers to avoid unrelated rebuilds
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
12
Implement an Android Splash Screen with the Modern SplashScreen API
Generate Kotlin implementation guidance for an Android splash screen using the Android 12+ SplashScreen API with fallback considerations and launch routing.
You are a senior mobile engineer.
Produce code or a code scaffold for an Android splash screen implementation using the SplashScreen API.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: the splash screen implemented with the legacy approach on Android 12+, causing a jarring double-splash effect, branding assets not sized for the new SplashScreen API's icon constraints, causing distortion, no fallback for devices on older Android versions where the new API isn't available, and splash duration tied to a fixed timer instead of actual app initialization, so the splash disappears before the app is actually ready.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (including older-OS fallback)
- Integration notes and assumptions
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.
13
Create an Image Picker in React Native with Permissions and Upload-Ready Handling
Draft an implementation guide for image picking in React Native that covers permissions, camera versus library selection, file handling, and upload preparation.
You’ll needlibrary choicepermission needscamera or gallery flowupload flowtarget platformsconstraints
Prompt
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: permission requests for camera and photo library not distinguished, so denying one silently blocks both, image files passed around at full resolution with no compression, bloating upload size and memory usage, no handling for a user canceling the picker, which some libraries treat as an error rather than a normal outcome, and platform differences between iOS and Android permission dialogs and file URIs not accounted for.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Permission handling per source (camera vs library)
- Compression/resizing before upload
- Cancel-as-normal-outcome handling
- Platform-specific URI and dialog differences
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
14
Set Up Unit Testing in Flutter for Services, State, and Business Logic
Provide a Flutter unit testing guide that covers package setup, mocking strategy, test structure, and how to separate widget tests from business-logic tests.
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: widget tests and business-logic unit tests conflated, making the suite slow and brittle because logic tests depend on widget rendering, mocking done inconsistently across the test suite instead of a single shared strategy, no test coverage for error and loading states beyond the happy path, and tests that depend on real async timing instead of using Flutter's fake-async testing utilities, making them flaky.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Separation of widget tests from business-logic tests
- Consistent mocking strategy
- Coverage of error/loading states not just happy path
- Deterministic async testing approach
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
15
Optimize Mobile App Memory and CPU Usage
Diagnose mobile memory and CPU bottlenecks and recommend targeted performance fixes.
You are a senior mobile app development debugging assistant working on a real production issue.
Diagnose and improve the technical issue below.
Context:
- Problem description: [problem]
- Stack or environment: [stack]
- Current system role or production impact: [system role]
- Expected behavior: [expected]
- Actual behavior: [actual]
- Relevant code, logs, traces, metrics, or signals: [evidence]
Instructions:
1. Check first for the causes that actually produce this class of bug: profiling done only on a high-end device, missing the memory and CPU pressure that shows up on the low-end devices real users actually have, re-renders triggered by inline function or object props creating new references every render, list rendering done without virtualization, causing memory to balloon with long lists, and image assets loaded at full resolution regardless of the display size actually needed.
2. Explain the debugging path in priority order based on risk, probability, and speed of confirmation.
3. Recommend fixes, mitigations, or containment steps and when each is appropriate.
4. Include how to validate the fix and what to monitor after rollout.
5. Keep the answer concise, operational, and biased toward restoring reliability.
Output format:
- Likely root causes (checked against the failure modes above)
- Highest-priority diagnostic steps
- Fix or containment options
- Validation and post-fix monitoring
- Main assumptions or risks
Missing information policy:
Ask up to 2 concise questions only if the stack, production impact, or failure mode is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prioritize root cause over guesswork.
- Name the specific failure modes above rather than generic debugging advice.
- Explain how to verify the fix.
- Include the operational reality of shipping the change safely.
16
Implement JWT Authentication in React Native with Secure Storage and Session Recovery
Create a guide for JWT authentication in React Native covering login flow, secure token storage, refresh handling, app restart recovery, and protected navigation states.
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: tokens stored in plain AsyncStorage instead of secure storage, exposing them if the device is compromised, no refresh-token handling so a user gets logged out the moment the access token expires, app-restart recovery that doesn't verify the stored token is still valid before assuming the user is authenticated, and no handling for a revoked or expired refresh token beyond a generic error.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Secure token storage decision
- Refresh-token flow and expiry handling
- App-restart session-validity check
- Revoked/expired-token error handling
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
17
Design an iOS In-App Purchase Flow with Receipt Validation and Failure Handling
Design an iOS in-app purchase flow with StoreKit covering product types, receipt validation, restore behavior, entitlement handling, and failure recovery.
You are a senior mobile engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: receipt validation done only on-device instead of server-side, making purchases trivially spoofable, no handling for a purchase that succeeds but the entitlement update fails to apply, leaving a paying user without what they bought, a restore-purchases flow not implemented or tested, so users who reinstall lose access to what they paid for, and sandbox testing quirks not accounted for, causing behavior that differs from production.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Server-side receipt validation design
- Purchase-success-but-entitlement-failure handling
- Restore-purchases flow
- Sandbox-vs-production behavior differences
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a mobile team shipping real work.
18
Automate React Native Deployment with Fastlane
Develop a strategy for automating React Native deployment using Fastlane.
You are a senior mobile app development architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: signing credentials and certificates managed manually outside Fastlane's match or an equivalent, making the pipeline dependent on one person's local keychain, no separation between a beta or internal distribution lane and the production release lane, risking an accidental store submission, build numbers not automated, causing manual version conflicts between iOS and Android, and no rollback plan if a build passes CI but fails store review.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
19
Plan a Photo Gallery Mobile App
Plan a photo gallery mobile app with authentication, cloud storage, and scalable media flows.
You are a senior mobile app development architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: cloud storage costs not modeled against expected user upload volume, leading to a pricing surprise at scale, no thumbnail or resizing pipeline, so every gallery view downloads full-resolution images and drains data and battery, authentication scoped without considering what happens to a user's photos if they delete their account, and no plan for handling a failed or partial upload, leaving orphaned files or broken references.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
20
Handle Form Input Validation in React Native with Formik
Generate code for form validation and inline errors in a React Native app using Formik.
You are a senior mobile engineer.
Produce code or a code scaffold for React Native form validation using Formik.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: a validation schema defined once but not kept in sync with what the backend actually enforces, producing confusing mismatches, error messages shown on every keystroke instead of on blur or submit, creating a hostile typing experience, async validation like a uniqueness check not debounced, hammering the backend on every keystroke, and form state not reset properly after a successful submit, leaving stale values on screen.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (including debounced async validation)
- Integration notes and assumptions
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.