Advanced interview questions in Mobile Dev, page 8

What is the role of TestDispatcher and runTest in coroutine testing?
This tests coroutine test infrastructure and virtual time control. A great answer says runTest installs a TestDispatcher and TestScope, skips delays automatically, and exposes advanceTimeBy to test timeouts instantly.
App Thinning: slicing, bitcode, and on-demand resources
Slicing delivers only the assets and code a device needs; bitcode let Apple recompile and re-optimize; on-demand resources defer large assets until requested.
How do you diagnose and fix flaky Flutter widget tests?
Audit unawaited futures, swap pumpAndSettle for explicit pumps or mock timers, and reproduce with logs.

What is Android Test Orchestrator and how does it isolate tests?
Tests process-level isolation in Android UI suites. A strong answer says it runs each test in its own Instrumentation process, stopping crashes or leaked state from cascading, and notes slower startup.
What are the key challenges of setting up Detox E2E?
Maintain separate debug/release build configs, rely on Detox automatic synchronization but tame uncontrolled async like timers and animations, and stabilize CI with headless emulators and retries.
Securely managing signing assets in CI/CD
Keep encrypted certificates and profiles in a controlled store or fastlane match repo, inject the decryption key and credentials via CI secrets, install into a temporary keychain per run.
How do you catch RN performance regressions?
Track TTI, JS and UI thread FPS, and memory; baseline them and gate CI with automated tools like Flashlight, using the React profiler and DevTools to diagnose.
Privacy manifests and the app privacy report
PrivacyInfo.xcprivacy declares collected data types, tracking, and reasons for required-reason APIs; Xcode aggregates your manifest plus SDK manifests into a privacy report.
Debug iOS code signing failure in CI that works locally
This tests Xcode code signing and CI keychain isolation. A strong answer checks exportOptions.plist, keychain profile presence, runner OS and Xcode versions, and entitlements mismatches. Red flag: manual local fixes or ignoring keychain access gaps.

Use Android Keystore to secure a database encryption key
Tests Android Keystore key generation and hardware trust boundaries. Strong answers: KeyGenParameterSpec with AES/GCM, TEE vs StrongBox isolation, setIsStrongBoxBacked on API 28+ with fallback, wrapping the database key. Red flag: claims Keystore encrypts DBs.
Designing a Fastfile for Versioning, match, and Uploads
Lanes bump versions, run match for signing, build with gym and gradle, upload via pilot and supply; secrets come from CI env or a vault.

Explain generational GC in ART and why onDraw must avoid allocations
Covers young-gen nursery, mark-sweep fallback, and why a 5-10ms GC pause misses 16ms frame deadline.
Optimizing Slow iOS CI Build Times
Profile the build, cache CocoaPods and DerivedData, use prebuilt frameworks, parallelize, scope to changed work.
The dynamic keyword and message dispatch
Dynamic forces Objective-C message dispatch via objc_msgSend, enabling KVO and swizzling, at the cost of skipping inlining and devirtualization.

How would you use Perfetto and Trace.beginSection to find a non-obvious bottleneck?
Tests correlation beyond CPU sampling. Covers coarse Trace.beginSection to limit 1-10us overhead, recording app ATrace with CPU/scheduling tracks, and correlating slices against scheduler latency. Red flag: omitting overhead or ignoring Perfetto SQL queries.
Limits of OTA Updates and Runtime Versions
OTA ships only JS and assets; native changes need a store build; runtime versions gate compatibility.
Verifying and avoiding copy-on-write overhead
Confirm extra copies via isKnownUniquelyReferenced or instruments and the retain trace; ensure unique references, mutate inout/in place, reserveCapacity, avoid aliasing.
Debugging a closure capture leak in a third-party library
Use the Memory Graph Debugger to inspect retain paths, the Leaks and Allocations instruments, and malloc stack logging; trace the cycle before patching.

What is a Dart Isolate and how does it differ from threads?
Tests Dart's shared-nothing concurrency model. Define an isolate as an independent heap plus event loop, contrast it with shared-memory threads, and explain UI isolate communication via async message ports.
When would you implement a CustomPainter and how does shouldRepaint work?
Use CustomPainter for charts; check fields in shouldRepaint to skip frames; pass Listenable to bypass build layout.
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