All bites
The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.
4330 bites
Page 139
Ad Hoc versus external TestFlight distribution
Ad hoc installs on pre-registered device UDIDs without Apple review; external TestFlight reaches many testers via the app but needs Beta App Review.
Using dSYM files to symbolicate crash reports
A dSYM maps stripped memory addresses back to function names, files, and line numbers; matched by UUID it symbolicates the report to readable frames.
Phased release to limit update risk
Enable phased release so an approved update reaches a growing percentage of automatic-update users over seven days; pause if metrics spike.
Automatic signing: benefits and limitations on teams
Automatic signing creates certificates and profiles on demand and keeps them in sync, easing local setup; limits include proliferating certificates, weak CI fit, and less control for complex entitlements.
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.
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.
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.
Purpose and setup of an Objective-C bridging header
The bridging header imports ObjC headers into Swift; Xcode auto-creates it or you add it manually and set the build setting.
Diagnosing choppy scrolling performance
Reach for Instruments, especially the Time Profiler and Core Animation/Hangs tools, and look for main-thread work and dropped frames.
Struct versus class performance and memory tradeoffs
Structs are value types, often stack-allocated with no ARC; classes are heap-allocated reference types with retain counts.
Exposing Swift classes to Objective-C
Subclass NSObject or mark members @objc, import the generated ModuleName-Swift.h, and accept that Swift-only types like enums with associated values cannot cross.
What an autoreleasepool is and when to add one manually
An autorelease pool holds objects until it drains; wrap tight loops creating many temporary ObjC objects in autoreleasepool to cap peak memory.
dispatch_async versus Task.detached for offloading work
Dispatch_async submits a closure to a queue; Task.detached starts an unstructured async task off the current actor without inheriting context.
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.
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.
map versus compactMap versus flatMap
Map transforms each element one-to-one; compactMap transforms then drops nils; flatMap transforms to sequences then concatenates.
Copy-on-write and implementing it for a custom struct
CoW shares a buffer until mutation, deep-copying only when the buffer is non-unique; Array, Dictionary, Set, String use it; implement with a class storage box and isKnownUniquelyReferenced.
View identity in SwiftUI and the .id() modifier
Identity links a view to its persistent state and transitions; structural identity comes from position, explicit identity from .id(); changing the id resets state and forces a new view.
Faulting in Core Data
A fault is a placeholder object whose property data is not yet loaded; accessing a property fires the fault and fetches from the store, saving memory.