Intermediate interview questions in Mobile Dev, page 4

Explain Gradle product flavors with a free/pro app example
This tests your grasp of the build variant matrix, not just flavors. A great answer defines flavors, explains how they combine with build types, details Gradle config (applicationIdSuffix), and mentions source sets.

Compare UIKit Auto Layout and SwiftUI layout systems
Tests imperative versus declarative layout paradigms. Contrast UIKit's constraint solver with SwiftUI's two-pass sizing and composition via stacks and modifiers instead of anchors. Red flag: claiming SwiftUI uses Auto Layout under the hood.
What is BuildContext? Give two tree-interaction examples.
Tests if you know BuildContext is an Element handle to a widget's tree location. Strong answers cite Theme.of and Scaffold.of as ancestor lookups, explain the own-context trap, and warn against caching across async gaps. Red flag: calling it the widget itself.

Which Android Studio tool inspects view hierarchy and what does it show?
Tests practical knowledge of runtime UI debugging tools. A strong answer names Layout Inspector, cites live view hierarchy with bounds and attributes, and distinguishes it from the static Layout Editor. Red flag: citing Logcat or the preview pane instead.

Which tool inspects the view hierarchy to debug layouts?
This tests your knowledge of core Android Studio debugging tools. A great answer names the Layout Inspector, describes its 3D component tree and attributes pane, and notes its live update capability on API 29+. A red flag is only mentioning XML files.

How do you debug a running app's view hierarchy?
Tests practical debugging skills. A good answer names the Layout Inspector, describes the component tree and attributes panes, and explains how the 3D view finds hidden elements. A red flag is only naming the tool without explaining its use.

Differences between @State, @Binding, @ObservedObject, and @EnvironmentObject
Tests SwiftUI state ownership and propagation. @State owns local value types; @Binding borrows for two-way edits; @ObservedObject accepts an external ObservableObject; @EnvironmentObject reads one from the environment.
How can you prevent unnecessary child rebuilds in Flutter?
Tests your grasp of Flutter build-boundary isolation. Strong answers hit const constructors, extracting the child into its own widget, and granular state selectors. Red flag: saying Keys alone stop rebuilds or recommending RepaintBoundary to skip builds.

What is ADB? Describe two common commands and what they accomplish.
This tests command-line debugging fluency. Define ADB as a client-server bridge, then give two commands such as adb install for APK deployment and adb logcat for streaming device logs. Red flag: calling it the Android Studio debugger or omitting the daemon.

What is ADB and what are two common commands you use?
Tests your hands-on familiarity with the core Android toolchain. Define ADB's client-server architecture, then explain adb install for APKs and adb logcat for logs. A red flag is being unable to name specific commands or only knowing IDE buttons.

What is the Android Debug Bridge (ADB)?
This tests practical command-line proficiency and understanding of the host-device link. A good answer defines the client-server-daemon architecture and gives two commands like adb install and adb logcat.

Integrate SwiftUI into UIKit and wrap UIKit for SwiftUI
Tests bridging architecture between UIKit and SwiftUI using UIHostingController and UIViewRepresentable. A strong answer names hosting controllers for SwiftUI in UIKit, representable protocols for UIKit in SwiftUI, and lifecycle hooks.
Explain lifting state up with a concrete scenario and benefits
Tests moving state to a common ancestor when siblings share data. Outline: pick two siblings, hoist state to the parent, pass values and callbacks down. Red flag: mutating a sibling via GlobalKey or choosing Provider before proving the parent cannot own it.
Diagnosing slow FlatList scroll and blank cells
Memoize renderItem and items, supply getItemLayout for fixed heights, tune windowSize, maxToRenderPerBatch, initialNumToRender, and removeClippedSubviews; profile first.
Re-rendering FlatList on external state change
FlatList is a PureComponent and only checks data and extraData by reference, so pass the external value via extraData and ensure renderItem reads current state.
Implementing infinite scroll with FlatList
Use onEndReached with onEndReachedThreshold to fetch the next page, append results, and show a footer loader; guard with a loading flag to prevent duplicate fetches.
Optimizing FlatList with variable item heights
Implement getItemLayout to return each item's length and cumulative offset so FlatList skips measurement and scrollToIndex works precisely; precompute heights per item type.

How do AppDelegate and SceneDelegate responsibilities differ?
AppDelegate owns process events (launch, push); SceneDelegate owns per-window lifecycle and UI.

How does a ViewModel survive configuration changes and what is its scope?
The framework retains ViewModels in a store scoped to an Activity or Fragment across config changes, clearing them only when the owner finishes for good.
Explain MVVM, its improvements over MVC, and Swift data binding techniques.
Tests architectural separation of concerns and pattern comparison skills. Define ViewModel as state transformer, cite MVC's massive view controller, and list Combine or closures for binding. Red flag: calling MVVM as MVC with no testability.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles