IOS
317 bites tagged IOS — interview questions with model answers, and 60-second explainers.
Swift Closures: Functions with a Memory
A closure is a function carrying luggage: it captures surrounding variables and remembers them later. Use them in SwiftUI actions, async completions, and array transforms. Beware a strong reference cycle from capturing self without a capture list.
Swift Basic Types: Value Semantics by Default
Swift's basic types are value type structs, so assignment copies, not shares, a reference. You feel this when passing Strings into functions or choosing Int over Double. The footgun is treating them as free to copy; large values cost memory and speed.
Apple's Natural Language Framework
Apple's Natural Language Framework turns raw strings into structured meaning on-device without network calls. Tokenize queries or extract entities from user text locally. It is not infallible; heavy synchronous tagging on the main thread freezes your UI.
UserNotifications Framework: iOS Alert Gatekeeper
UserNotifications is the gatekeeper between your app and the lock screen. You use it to request permission and schedule local or push alerts on iOS. Send a notification before authorization and the system silently drops it.
How would you optimize Flutter CI build times beyond caching?
Tests platform build pipeline knowledge and CI design. Answers hit Gradle parallelism and R8 config for Android, Xcode derived data, target thinning on iOS, plus Dart AOT flags and sharding.
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.
How do you handle platform-specific configurations per flavor on Android and iOS?
Tests if you know flavors delegate icons and titles to native tooling. On Android, use productFlavors in build.gradle with source sets or placeholders; on iOS, use Xcode build configurations with Info.plist values or asset catalogs.
Present full-screen native SDK UI from Flutter and return a result
This tests platform channel architecture for full-screen native UI delegation. Use MethodChannel to launch the native controller, retain the async result callback, serialize the dismissal payload back to Dart, and avoid PlatformView for modal flows.
Safely gating native OS version APIs in a custom Flutter plugin
Tests platform channel contracts and defensive native coding. Gate native calls with OS version checks, return result.error with an UNSUPPORTED code, handle PlatformException in Dart, and avoid Dart-only checks.
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.
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.
Apple HIG Compliance
Apple's HIG is the rulebook for native iOS and macOS apps. Compliance means matching platform conventions for layout and navigation. The footgun is treating it as a visual skin while ignoring interaction patterns, making apps that look right but feel wrong.
React Native: Creating an iOS Native Module
An iOS Native Module is a bridge, letting your JavaScript code call directly into native Objective-C or Swift. Use it to access platform APIs unavailable in React Native or for performance-critical tasks.
React Native Secure Storage: Using Keychain and Keystore
Use the device's native vault (Keychain/Keystore) to store secrets, not plaintext in AsyncStorage. It's for securely persisting small data like API tokens or private keys. The footgun is treating it like a general database; it's slow and for secrets only.
App Store Review: The Rules of Apple's Walled Garden
Think of App Review as Apple's curation for its "walled garden," prioritizing user safety and a consistent experience. It's the final gate before your app ships. The main footgun is assuming the rules are purely objective; Apple judges subjective quality.
Archiving a React Native iOS App for Release
Archiving creates a production-ready package for the App Store by bundling your JavaScript and disabling dev menus. This is the final step before submitting to TestFlight or for review.
Local Notifications: Your App's On-Device Messenger
Local notifications are messages your app sends to itself on the user's device, no server needed. Use them for timers, reminders, or download progress. The footgun: forgetting to create Android Notification Channels will cause your alerts to fail silently.
React Native: Navigating Platform-Specific Shadow Styles
React Native shadow APIs expose underlying platform differences. Use the web-like `boxShadow` for cross-platform consistency or the `shadow*` props for direct native control.
ActionSheetIOS: Native iOS Action Menus
ActionSheetIOS presents a native iOS menu sliding up from the bottom, offering users contextual choices. It's ideal for simple actions like "Delete" or "Save" and can also trigger the native share sheet.
The Package.swift Manifest File
Think of Package.swift as a recipe for your code, telling the Swift Package Manager (SPM) what to build, what it needs, and where it can run. You use it to define libraries, list dependencies, and set minimum OS versions.
Swift Property Wrappers: Reusable Logic for Properties
A Swift Property Wrapper is a template for a property's get/set logic, letting you reuse behaviors like data validation without boilerplate. It powers SwiftUI's @State and is great for managing UserDefaults.
Refining Objective-C APIs for Swift with NS_SWIFT_NAME
NS_SWIFT_NAME gives Objective-C code a Swifty alias without changing the original API. Use it to modernize legacy frameworks by removing prefixes for Swift consumption.
Optimizing iOS App Launch Time
An app launch is a race against the system's watchdog timer. The OS loads your app in two phases: pre-main and main. Optimizing both is key. The biggest footgun is ignoring the pre-main phase, where bloated dynamic libraries can kill performance.
Address Sanitizer: Find Memory Bugs at Runtime
Address Sanitizer (ASan) is a runtime debugging tool that finds memory corruption bugs. Enable it in Xcode to catch buffer overflows and use-after-free errors as they happen, preventing crashes that are hard to trace back to their source.
Get IOS bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.