IOS
317 bites tagged IOS — interview questions with model answers, and 60-second explainers.
Swift Errors and the NSError Bridge
Swift's modern `Error` protocol and Objective-C's `NSError` are different, but Swift automatically "bridges" them. This is key when calling older Apple APIs, which throw `NSError`s.
Lightweight Generics: Type Safety for Objective-C
Lightweight generics bolt type safety onto Objective-C collections like NSArray. This lets Swift see an NSArray<NSString *> as a type-safe [String] instead of [Any], preventing runtime crashes.
Objective-C Nullability: Bridging to Swift's Optionals
Nullability annotations are like adding `?` or `!` to your Objective-C pointers, telling Swift how to handle `nil`. They're essential in mixed codebases to bridge Objective-C's pointers to Swift's safe Optionals.
Autorelease Pools: Managing Temporary Object Memory
Think of an autorelease pool as a temporary holding pen for objects. It defers their deallocation until a code block ends. UI frameworks handle this, but you'll add one in tight loops with many temporary objects to reduce peak memory, or on background threads.
Selectors: Objective-C's Function Pointers in Swift
A selector is a lightweight name for a method, not a direct pointer. Swift uses it to call Objective-C code dynamically at runtime. It's common in UIKit for target-action patterns, like button taps. The footgun: forgetting `@objc` causes a runtime crash.
Bridging Header: Mixing Objective-C and Swift
A bridging header is a translation list for Xcode, letting your new Swift code call old Objective-C code. It's essential when migrating a legacy codebase or using an Objective-C library. The footgun: it only exposes Objective-C to Swift, not vice-versa.
Main Thread Checker: Keep Your UI Responsive
The Main Thread Checker is an Xcode tool that catches UI updates on background threads, which cause crashes or glitches. It runs during debugging, flagging AppKit, UIKit, or SwiftUI calls made off the main thread.
Grand Central Dispatch (GCD): Your App's Task Manager
Grand Central Dispatch (GCD) is your app's task manager, letting you run code in the background without freezing the UI. Use it to offload network requests or heavy computations, then update the UI on the main queue.
App Store Server Notifications: Your Backend's Source of Truth
App Store Server Notifications are webhooks from Apple that tell your backend about subscription events like renewals or refunds. They are your server's source of truth for user entitlements, letting you grant or revoke access without relying on the client…
On-Demand Resources: Keep Your App Bundle Slim
On-Demand Resources (ODR) host app assets on the App Store, not in your bundle, shrinking your initial download. Use it for game levels or tutorials not needed at first launch. The OS downloads assets by "tag" when requested, but can also purge them to save.
App Thinning: Ship Only What's Needed
App Thinning shrinks your app's download by delivering only the assets a specific device needs. The App Store uses Slicing for device-specific art and code, and you can use On-Demand Resources for assets downloaded after installation.
Xcode Cloud
Xcode Cloud is Apple's built in CI/CD service that builds, tests, and distributes iOS and Mac apps from source control on Apple hosted cloud Macs, so teams do not need to run their own build hardware or manage signing separately.
App Store Connect Analytics
App Analytics in App Store Connect is Apple's built in, privacy preserving dashboard showing how users find, install, and use an app, covering impressions, product page views, conversion rate, downloads, and retention, with no SDK required.
Phased Release: De-Risking App Updates
A phased release is like slowly opening a floodgate for your app update. It rolls out to a small percentage of users first, letting you monitor for crashes before it reaches everyone and limiting the blast radius of a bad bug.
Navigating Apple's App Store Submission and Review
Think of App Store submission as a strict gatekeeping process, not just an upload. You must prove your app is safe, reliable, and transparent via App Store Connect.
TestFlight: Apple's Beta Testing Framework
TestFlight is your private App Store for beta builds. Use it to distribute pre-release versions to internal teams and external testers for feedback before a public launch. The footgun: external tester builds require a beta App Review, unlike internal builds.
App Store Reviews: Your Public Support Channel
Treat App Store reviews as public conversations, not just support tickets. Responding lets you fix your app's narrative, help users with issues, and show potential customers you're engaged. The footgun is writing an emotional or defensive reply.
Archiving an iOS App for Distribution
Archiving an app bundles your code and assets into a distributable package. It's the final step before sending your app to beta testers on TestFlight or submitting it to the App Store.
App Store Connect: Your App's Mission Control
Think of App Store Connect as your app's mission control. It’s the web portal for managing your app's lifecycle after coding, from uploading builds and running TestFlight betas to submitting for final review.
Apple Developer: The Official Resource Hub
Think of Apple Developer as the official command center for building on Apple platforms. It's the central website for the tools, APIs, and technical resources you need to write software for iOS, macOS, watchOS, and more.
Custom Frameworks: Best Practices for Sharing Code
A custom framework is a private toolkit, bundling shared code and resources for use across multiple apps. Use them for common logic in an app suite, but always prefix public symbols to avoid name collisions and static link errors.
Swift Library Evolution: Shipping Break-Proof Frameworks
Library Evolution lets you update a Swift framework without breaking apps that use it, even if they don't recompile. It's crucial for shipping binary SDKs. The footgun is that many seemingly safe changes, like adding a struct property, are binary-breaking by…
Static vs. Dynamic Linking: Code Size vs. Flexibility
Static linking bakes library code into your app, creating a large but self-contained executable. Dynamic linking loads libraries at runtime, saving space. This choice impacts app size, launch time, and updates.
Swift Package Resources: Bundling Assets with Code
A Swift Package resource bundle is like a fanny pack for your code, letting you package assets like images and data files directly with your library. This makes your package self-contained.
Get IOS bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.