tezvyn:

📱Mobile Dev

Mobile app development across platforms

351 bites

iOS & Swift30 sec read

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.

iOS & Swift30 sec read

How do UITableView and UICollectionView reuse cells?

This tests your understanding of UIKit's flyweight pattern and scroll performance. A strong answer covers the reuse pool, dequeueReusableCell mapping identifiers to new index paths, and registration.

iOS & Swift30 sec read

UIViewController lifecycle states: network vs geometry updates

Tests UIViewController lifecycle states and separation of data vs layout. Strong answers list loadView to viewDidDisappear, start network in viewDidLoad or viewWillAppear, and geometry in viewDidLayoutSubviews. Red flag: network calls inside layout methods.

iOS & Swift30 sec read

What is @State in SwiftUI and how does it affect the view?

Tests declarative data flow ownership. A strong answer defines @State as private value-type storage owned by the view that triggers a body re-evaluation on mutation. Red flag: confusing it with external data sources like @ObservedObject or @Binding.

iOS & Swift30 sec read

When should you use frame-based layout versus Auto Layout?

WHAT IT TESTS: When manual frames beat constraints. ANSWER OUTLINE: Frames suit static or high-frequency UI like particle systems; Auto Layout handles rotation, Dynamic Type, localization, and split screen. RED FLAG: Claiming Auto Layout always wins.

iOS & Swift30 sec read

How would you use Energy Log to investigate battery drain?

Tests correlating Instruments energy metrics to app behavior. Strong answers profile with Energy Log, map CPU/Location/Network spikes to user flows or background work, and validate fixes with before/after logs. Red flag: blaming the OS without evidence.

iOS & Swift30 sec read

Explain symbolic breakpoints and debug Auto Layout with one

Tests debugging closed-source frameworks without source lines. A strong answer says a symbolic breakpoint stops on UIViewAlertForUnsatisfiableConstraints, then checks the backtrace or log to find the bad view.

iOS & Swift30 sec read

Difference between .xcodeproj and .xcworkspace, and when to use a workspace

Tests your mental model of Xcode build containers. A project defines one buildable unit; a workspace groups multiple projects so they build together and share derived data. Use it for package managers or modular codebases.

iOS & Swift30 sec read

Explain Copy-on-Write in Swift and implement it for custom structs

Tests value semantics with reference storage and uniqueness checks. A strong answer explains CoW delays copy until mutation via isKnownUniquelyReferenced, lists custom steps: wrap, read, check, clone. Red flag: assuming structs are automatically CoW.

iOS & Swift30 sec read

Swift struct vs class: differences and when to choose each

Tests value vs reference semantics and let mutability. Strong answers contrast copy behavior with shared references, note allocation tendencies, and choose struct for value semantics or class for identity.

Flutter & Dart30 sec read

Which widget overlays and centers a loading indicator on an image?

WHAT IT TESTS: Stack overlays and centering non-positioned children. ANSWER OUTLINE: Stack with Image first (bottom), then Center-wrapped indicator; constrain Stack to image. RED FLAG: Column/Row or manual Positioned offsets instead of Stack/Center alignment.

Flutter & Dart30 sec read

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.

Flutter & Dart30 sec read

Unit test a BLoC handling an AddItem event and emitting state

WHAT IT TESTS: Whether you know BLoC testing idioms and why bloc_test beats manual assertions. ANSWER OUTLINE: Use blocTest with build, act, expect; mention seed, skip, and mocktail for dependencies.

Flutter & Dart30 sec read

What is Pigeon and how does it improve platform channels?

This tests type-safe platform channels versus manual MethodChannel boilerplate. Answer: Pigeon is a dev-time code generator that creates typed host stubs from a Dart contract, removing string keys and encoding. Red flag: calling it a runtime library.

Flutter & Dart30 sec read

What native iOS and Android config does the Flutter camera plugin need?

Tests native platform knowledge beyond Dart. iOS requires NSCameraUsageDescription and NSMicrophoneUsageDescription in Info.plist. Android needs minSdk 24 and choosing between CameraX or Camera2 implementations.

Flutter & Dart30 sec read

Key difference between shared_preferences and flutter_secure_storage for tokens

Tests at-rest encryption: shared_preferences stores plain text XML/plist, while secure storage uses iOS Keychain and Keystore with RSA OAEP plus AES-GCM. Answers cite backup risks and hardware keys. Red flag: calling prefs safe or relying on obfuscation.

Flutter & Dart30 sec read

Why is Flutter local storage async and how do you use shared_preferences?

Tests why disk I/O must avoid blocking Dart's UI thread. A strong answer shows async/await with getInstance and setters, notes legacy getters are sync-after-cache, and warns writes may not persist instantly.

Flutter & Dart30 sec read

Why are stale search requests problematic and how do you cancel them?

This tests race conditions and resource waste in async UI. Strong answers note stale requests waste bandwidth and overwrite newer results; cancel the previous call with a CancelToken before issuing the next.

Flutter & Dart31 sec read

Implement an API caching layer with offline support and storage trade-offs

WHAT IT TESTS: Designing a tiered cache for speed and resilience. ANSWER OUTLINE: Use in-memory for hot data and disk for offline, pick Hive or SQLite by shape, and use TTL with a sync queue. RED FLAG: Ignoring invalidation or treating all data identically.

Flutter & Dart30 sec read

Explain Dio interceptors and automatic token refresh

WHAT IT TESTS: Stateful middleware and async orchestration. ANSWER OUTLINE: Define interceptors as hooks; queue concurrent 401s during refresh; retry with Bearer header via token manager. RED FLAG: Synchronous refresh or refresh storms.