Repository navigation
refactor: iOS best-practice audit — unified logging, iOS 15 baseline, API cleanup - #6
Merged
Merged
Conversation
… API cleanup - Replace all print() with os.Logger via an internal Log façade (subsystem com.screenutil; core/debug/benchmark categories) - Raise deployment baseline to iOS 15 / macOS 12 / tvOS 15 / watchOS 8 and drop now-redundant @available annotations in SwiftUI - Remove dead splitScreenMode from the config and ScreenUtilConfigurable - Gate measurePerformance / benchmarkScalingOperations behind #if DEBUG - Mark ScreenScalable / ScreenUtilConfigurable / ScreenDimensionProvider Sendable - Derive ScreenDimensions.current from the active UIWindowScene instead of the soft-deprecated UIScreen.main - Conform ScalingLimits, ScreenMetrics, ScreenDimensions, SafeAreaInsets, ScreenUtilConfiguration, ScaleType, and DeviceType to Equatable/Hashable - Unify ScaledValue's nested ScaleType into the top-level ScaleType (.font → .text, .auto removed, default .width) - Add doc comments across the public API; update README and CHANGELOG
Dicky019
added a commit
that referenced
this pull request
Jun 21, 2026
refactor: iOS best-practice audit — unified logging, iOS 15 baseline, API cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full iOS best-practice audit ahead of publishing. Behavior-preserving where possible; pre-1.0 breaking changes where they improve the API.
Logging
print()with unified logging (os.Logger) behind a call-style façade:Log(.category, message, level:).LogCategory(core/debug/benchmark) → dedicated Console.app categories;LogLevel(debug/info/notice/warning/error/fault);.publicprivacy applied centrally.Platform
@available(iOS 13…)in SwiftUI.ScreenDimensions.currentnow derives from the activeUIWindowSceneinstead of the soft-deprecatedUIScreen.main.API cleanup (breaking)
splitScreenMode(config +ScreenUtilConfigurable).measurePerformance/benchmarkScalingOperationsbehind#if DEBUG.ScaledValue's nestedScaleTypeinto the top-levelScaleType(.font→.text,.autoremoved, default.width).Correctness & ergonomics
ScreenScalable/ScreenUtilConfigurable/ScreenDimensionProviderasSendable.ScalingLimits,ScreenMetrics,ScreenDimensions,SafeAreaInsets,ScreenUtilConfiguration,ScaleType,DeviceTypetoEquatable/Hashable.Docs
///comments across the public API; update README deployment versions and CHANGELOG.Verification
swift build/-c releasecleanswift test: 119 passing (+6 newEquatableConformanceTests)Out of scope
Examples/(deferred to a later full refactor), watchOSWKInterfaceDevicemetrics, SwiftLint, LICENSE reconciliation.