First tagged release of ScreenUtil — a thread-safe, responsive screen-adaptation
library for Apple platforms (iOS 15 / macOS 12 / tvOS 15 / watchOS 8). Scale your
UI from a fixed design size to the real device. Inspired by flutter_screenutil.
Highlights
- Swift 6 language mode, builds clean under
-strict-concurrency=complete. - Lock-free, race-free reads via an immutable atomic scale-factor snapshot
(verified under ThreadSanitizer);configure(with:)/refreshMetrics()are@MainActor. - Numeric scaling:
.w .h .sp .r .sw .shonInt/Float/Double/CGFloat. - Performance paths: capture-once
FastScale/withFastScale, bulkBatchScaler/withBatchScaler. - First-class UIKit & SwiftUI: scaled
UIFont/UIView/UIEdgeInsetshelpers,EnvironmentValues.screenUtil. - Platform-isolated layout (Core / Internal / Metrics / Scaling / UIKit / SwiftUI / Debug) — macOS build is structurally safe.
- Ships a privacy manifest declaring no data collection and no tracking.
One dependency: apple/swift-atomics (lock-free snapshot).
See CHANGELOG.md for the full list of changes, fixes, and breaking removals.