Basics
Warm-up questions for freshers and junior roles.
Q1.What is the difference between a native, hybrid and cross-platform app?
A native app is written with the platform's own tools, Swift or Objective-C for iOS and Kotlin or Java for Android, so it gets full API access and the best performance. A hybrid app runs web code inside a WebView, like Ionic with Capacitor. Cross-platform frameworks such as Flutter and React Native share one codebase but render real native or custom-drawn UI, so they sit between the two.
Q2.Explain the mobile app lifecycle in simple terms.
An app moves through states: not running, launched, active in the foreground, inactive (for example during an incoming call), in the background and finally suspended or killed by the OS. Developers hook into these transitions to save state, pause video, stop location updates and refresh data when the user returns.
Q3.Why does the OS kill background apps?
Phones have limited memory and battery. When memory is low the OS terminates background processes, starting with the least recently used. That is why an app must save important state when it goes to the background and be able to restore it on the next launch.
Q4.What is the difference between a cold start and a warm start?
A cold start launches the app from scratch: the process is created, the runtime loads and the first screen is built. A warm start brings back a process that is still in memory, so it is much faster. Interviewers ask this because cold start time is one of the first metrics users feel.
Q5.What options do you have for storing data locally?
Key-value storage for small settings (UserDefaults, SharedPreferences or DataStore), a local database for structured data (SQLite through Room, Core Data, SwiftData, Realm or Drift), files for images and documents, and the Keychain or Android Keystore for secrets like tokens.
Q6.Where should you store an authentication token on a phone?
In secure storage: the iOS Keychain or Android's EncryptedSharedPreferences backed by the Keystore. Plain preferences or a text file can be read on rooted or jailbroken devices and from some backups.
Q7.What is a REST API and how does a mobile app use it?
REST is a style of HTTP API where resources have URLs and you use methods like GET, POST, PUT and DELETE on them. The app sends requests, usually with JSON bodies, parses the JSON response into model objects and shows the result in the UI.
Q8.Why must network calls never run on the main thread?
The main thread draws the UI and handles touches. A network call can take seconds, so running it there freezes the screen. Android throws NetworkOnMainThreadException, and on iOS the app becomes unresponsive and can be killed by the watchdog. Use async/await, coroutines or background queues instead.
Q9.What are push notifications and how do they reach a device?
Your server sends a message to Apple Push Notification service (APNs) or Firebase Cloud Messaging (FCM) with the device token. That service keeps a persistent connection to the phone and delivers the message, and the OS shows it or wakes the app.
Q10.What is the difference between a local and a remote notification?
A local notification is scheduled by the app itself on the device, for example a reminder at 8 pm. A remote or push notification comes from a server through APNs or FCM.
Q11.What are app permissions and when should you ask for them?
Permissions protect sensitive features such as camera, location, contacts and notifications. Ask at the moment the feature is needed, explain why first, and handle the denied case gracefully instead of blocking the whole app.
Q12.What is responsive layout on mobile?
It means the UI adapts to different screen sizes, orientations, notches, foldables and text size settings. You use constraints, flexible layouts and safe areas instead of fixed pixel positions.
Q13.What is the difference between dp, pt and px?
Pixels are physical dots on the screen. Density-independent pixels on Android (dp) and points on iOS (pt) are logical units that scale with screen density, so a 44 pt button looks roughly the same size on every phone.
Q14.What does an app's bundle ID or package name do?
It is the unique identifier for your app, such as com.company.app. Stores, push services, deep links and signing all use it, and it cannot be changed after the app is published.
Q15.How do you debug a mobile app?
Use breakpoints in Xcode or Android Studio, read logs in the console or Logcat, inspect network traffic with a proxy like Charles or Proxyman, use the layout inspector for UI bugs and add crash reporting such as Firebase Crashlytics or Sentry for production issues.
Intermediate
Questions for developers with one to three years of experience.
Q16.Explain MVC, MVVM and MVI.
In MVC the controller sits between views and models, and on iOS it often grows huge. MVVM moves presentation logic into a ViewModel that exposes state the view observes, which makes it testable. MVI treats the screen as a single immutable state updated by user intents, which gives a predictable one-way data flow.
Q17.What is clean architecture in a mobile app?
It splits the code into layers: presentation (UI and ViewModels), domain (use cases and business rules) and data (repositories, API and database). Dependencies point inward, so business logic does not depend on frameworks and can be tested on its own.
Q18.What is the repository pattern?
A repository is a single class that hides where data comes from. The UI asks the repository for users, and the repository decides whether to read the local database, call the API or both. This keeps caching and offline logic in one place.
Q19.How would you build an offline-first app?
Treat the local database as the source of truth. The UI reads only from the database, network responses are written into it, and user changes are saved locally first and queued for sync. You also need conflict rules, such as last write wins or server wins, and a background sync job.
Q20.What is dependency injection and why use it?
Dependency injection means a class receives its dependencies instead of creating them, for example a ViewModel receives a repository in its constructor. It makes code testable and swappable. Common tools are Hilt or Koin on Android and simple initializer injection or containers like Factory on iOS.
Q21.How do you handle pagination in a list?
Request data in pages using a page number or, better, a cursor from the API. Load the next page when the user is near the end of the list, show a footer loader, avoid duplicate requests while one is running, and handle the end of the data. Android Paging 3 does much of this for you.
Q22.What is deep linking and what are universal links or app links?
A deep link opens a specific screen inside the app from a URL. Custom schemes like myapp:// work but can be claimed by other apps. Universal Links on iOS and App Links on Android use normal https URLs verified by a file on your domain, so only your app can open them.
Q23.How do you make a long list scroll smoothly?
Use recycling lists (RecyclerView, LazyColumn, UITableView, List or FlatList), keep item layouts flat, load and decode images off the main thread at the right size, cache them, avoid heavy work in bind or build methods and give items stable keys.
Q24.What is the difference between unit, integration and UI tests?
Unit tests check one class or function in isolation and run fast. Integration tests check several parts together, such as a repository with a real database. UI tests drive the app like a user with Espresso, Compose testing, XCUITest or Detox, and are slower and more fragile, so you write fewer of them.
Q25.How do you secure API calls from a mobile app?
Use HTTPS only, send short-lived access tokens with refresh tokens, keep secrets out of the app binary, validate everything on the server, and consider certificate pinning for high-risk apps. Remember that anything shipped in the app can be extracted.
Q26.What is certificate pinning?
The app checks that the server's certificate or public key matches a value built into the app, not just any certificate trusted by the device. It blocks many man-in-the-middle attacks, but you need a plan for rotating keys or the app breaks when the certificate changes.
Q27.How do you handle different environments like dev, staging and production?
Use build flavors on Android and schemes with configurations on iOS, each with its own base URL, app icon, bundle ID suffix and Firebase project. Never switch environments by editing code before a release.
Q28.What is code signing?
Code signing proves who built the app and that it was not modified. iOS uses certificates and provisioning profiles from the Apple Developer account. Android signs with a keystore, and with Play App Signing Google holds the final signing key while you upload with an upload key.
Q29.How do you manage app state across screens?
Keep state as close as possible to where it is used, share it through ViewModels or a store when several screens need it, persist anything that must survive process death and pass only IDs between screens rather than large objects.
Q30.What is the difference between a WebView and a native screen?
A WebView renders HTML inside the app. It is quick for content pages, help centres or payment pages, but it feels less native, has weaker access to device features and can be a security risk if it loads untrusted content or exposes JavaScript bridges.
Advanced
Senior-level questions on performance, architecture and release.
Q31.How do you reduce app startup time?
Measure first with Xcode Instruments, Android Studio profilers or Macrobenchmark. Then delay non-critical SDK setup, avoid disk and network work before the first frame, lazy-load modules, use Baseline Profiles on Android and keep the first screen simple. Track cold start as a release metric.
Q32.How do you find and fix memory leaks?
Use Xcode's memory graph and Leaks instrument on iOS, and LeakCanary or the Android Studio memory profiler on Android. Common causes are retain cycles in closures, listeners that are never removed, static references to activities or views and long-running tasks holding a screen.
Q33.How do you reduce app size?
Enable code shrinking with R8 or dead-code stripping, ship Android App Bundles so users download only what their device needs, compress images and use vector assets, remove unused libraries and resources, and download large optional content on demand.
Q34.How would you design a chat feature?
Use a persistent connection such as WebSockets for live messages, with push notifications when the app is closed. Store messages locally with a status (sending, sent, delivered, read), assign client-side IDs so retries are safe, paginate history and sync missed messages using a last-seen cursor when the app reconnects.
Q35.How do you handle background work reliably?
Use the platform scheduler instead of keeping the app alive: WorkManager on Android and BGTaskScheduler or background URL sessions on iOS. Make tasks idempotent and short, respect battery and network constraints, and expect the OS to delay or skip them.
Q36.What is modularisation and why do large teams use it?
The app is split into feature and core modules with clear boundaries. Builds become faster because only changed modules recompile, teams can own features independently, and dependencies are easier to control.
Q37.How do you roll out a risky feature safely?
Hide it behind a remote feature flag, release to a small percentage with a staged rollout in Play Console or phased release on the App Store, watch crash and business metrics, and keep a kill switch so you can turn it off without a new build.
Q38.How do you force users to update when an old version breaks?
Have the app check a minimum supported version from your server or remote config at launch. If it is too old, show a blocking update screen. On Android you can also use the In-App Updates API. The server should keep old API versions alive long enough for users to update.
Q39.What is server-driven UI?
The server sends a description of the screen layout as JSON, and the app renders it with prebuilt components. It lets teams change screens without an app release. The cost is more complex tooling, testing and versioning of components.
Q40.How do you keep an app accessible?
Give every control a label for VoiceOver and TalkBack, support dynamic font sizes, keep touch targets at least 44 pt or 48 dp, ensure colour contrast, do not rely on colour alone and test with a screen reader on a real device.
Q41.How do you design a mobile CI/CD pipeline?
On each pull request run lint, unit tests and a build. On merge build signed artifacts, run UI tests on emulators or a device farm, and upload to TestFlight or Play internal testing using Fastlane, Xcode Cloud, Bitrise or GitHub Actions. Keep signing keys in a secure secret store.
Q42.What metrics show that an app is healthy in production?
Crash-free users and sessions, ANR rate on Android, app hangs on iOS, cold start time, network error rate, frame drops, battery use and business funnels like sign-up conversion. Set alerts so a bad release is caught in hours, not days.
Q43.How do you protect the app from reverse engineering?
You cannot fully prevent it, but you can raise the cost: obfuscate with R8, avoid hard-coded secrets, move sensitive logic to the server, use Play Integrity or App Attest to check the app is genuine and detect tampering where it matters, such as banking or games.
Scenario questions
Open questions where the interviewer wants to hear how you think.
Q44.Users say the app is slow on old Android phones. What do you do?
Reproduce it on a low-end device, then profile CPU, memory and rendering. Look for heavy work on the main thread, oversized images, deep layouts and too many SDKs at startup. Fix the top offenders, add Baseline Profiles and set a performance budget in CI.
Q45.The crash rate jumped after a release. Walk through your response.
Pause the staged rollout first. Check Crashlytics or Sentry for the top new crash, its device and OS spread and the stack trace. If a feature flag covers the code, turn it off. Ship a hotfix, add a test that reproduces the crash and review why it was not caught.
Q46.Your app works on Wi-Fi but fails on mobile data. What could be wrong?
Possible causes are timeouts that are too short, IPv6-only networks, carrier proxies, large payloads, HTTP instead of HTTPS being blocked, or a server firewall allowing only certain ranges. Test with network link conditioners and log failed requests with error codes.
Q47.How would you add dark mode to an existing app?
Move hard-coded colours into semantic colour tokens like background and textPrimary, define light and dark values, check images and icons for contrast, test every screen in both modes and let users follow the system setting by default.
Q48.The product manager wants a feature in one week that normally takes three. How do you respond?
Break the feature down, show what fits in one week, propose a smaller first version behind a flag, and be clear about what is cut and what technical debt it creates. Agreeing to something you cannot deliver hurts more than an honest plan.
Q49.How would you migrate a large app from XML views or UIKit to Compose or SwiftUI?
Do it screen by screen. Both platforms support interoperability, so new screens use the new toolkit while old ones keep working. Start with simple, low-risk screens, build a shared design system in the new toolkit and keep UI tests running throughout.
Q50.An API returns 2 MB of JSON for a list screen. How do you improve it?
Ask the backend for pagination and only the fields the screen needs, enable gzip or brotli compression, cache responses with ETags, and parse JSON off the main thread. A GraphQL or BFF layer can also shape data for mobile.
Q51.How do you support both phones and tablets?
Use adaptive layouts based on window size classes rather than device type, show list and detail side by side on large screens, support multitasking and rotation, and test on foldables and iPad split view.
Q52.A user reports that a payment was charged twice. How would you investigate?
Check server logs and the payment provider for both transactions, then look at the client for retries without an idempotency key, double taps on the pay button and repeated requests after a timeout. Fix by sending an idempotency key with each payment and disabling the button while the request runs.
Q53.How would you choose between native and cross-platform for a new product?
Consider team skills, time to market, how much platform-specific UI and hardware access the app needs, performance needs and long-term maintenance. A content or form-heavy app suits Flutter or React Native; an app built around camera, AR or deep OS integration often justifies native.
Q54.How do you test push notifications end to end?
Use a test device with a real token, send through the Firebase console or an APNs tool, and check foreground, background and killed states, tapping the notification to open the right screen, and the case where permission was denied.
Q55.What would you check before submitting to the App Store or Play Store?
Version and build numbers, release notes, privacy labels or the data safety form, permission strings, crash-free testing on real devices, screenshots, account deletion support if the app has sign-up, and that no debug endpoints or logs are left in the build.
How to prepare for the interview
- Have one shipped app (even a small one on TestFlight or internal testing) you can walk through screen by screen.
- Be ready to draw your app architecture: UI layer, state, data layer, network and local cache.
- Know the numbers you measured: cold start time, crash-free rate, APK or IPA size.
- Expect a take-home or live task that fetches a list from an API, caches it and handles errors and empty states.