Skip to content
tezvyn:

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

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift2 min read

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.

iOS & Swift2 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift1 min read

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.

iOS & Swift2 min read

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.

iOS & Swift2 min read

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.

iOS & Swift1 min read

map versus compactMap versus flatMap

Map transforms each element one-to-one; compactMap transforms then drops nils; flatMap transforms to sequences then concatenates.

iOS & Swift1 min read

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.

iOS & Swift2 min read

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.

iOS & Swift2 min read

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.