
Số 756 của iOS Dev Weekly đưa tin Swift Package Index chính thức gia nhập Apple, với người sáng lập Dave Verwer cũng tham gia công ty. Bản tin cũng đề cập đến những cải tiến trong iOS 27 như chế độ Recovery giống Mac và nâng cấp AsyncImage trong SwiftUI (hỗ trợ URLRequest, chia sẻ URLSession tùy chỉnh), cùng với các chủ đề khác như cải tiến concurrency trong Swift 6.4, nghiên cứu sâu về mô hình đồ thị của SwiftUI, tiện ích CrashReportExtension mới của Apple cho báo cáo lỗi ngoài tiến trình, và khám phá _UIPortalView riêng tư của UIKit để phản chiếu live view.
Vì sao nên đọc: Để cập nhật những thay đổi mới nhất trong Swift, iOS và UIKit—và hiểu cách áp dụng các tính năng như AsyncImage và CrashReportExtension để nâng cao hiệu suất và quản lý lỗi trong ứng dụng của mình.
Nguồn: https://main--iosdevweekly.netlify.app/issues/756. 8sync News chỉ tóm tắt và dẫn link; bản quyền nội dung thuộc tác giả và nguồn gốc.
Apple mua lại Swift Package Index (SPI), công cụ tìm kiếm các gói Swift nguồn mở, và người sáng tạo Dave Verwer sẽ gia nhập Apple để tiếp tục phát triển. SPI vẫn duy trì mã nguồn mở theo giấy phép Apache 2.0, nhưng Apple cam kết đẩy nhanh phát triển, bao gồm ký gói, tính năng nhận dạng, và đặc biệt là loại bỏ sự phụ thuộc lâu nay vào GitHub. SPI hiện lưu trữ hơn 11.000 gói và sẽ chuyển dần sang mô hình registry độc lập với nền tảng lưu trữ nguồn. Một số nhà phát triển lo ngại về việc tài nguyên cộng đồng độc lập rơi vào sự kiểm soát hoàn toàn của doanh nghiệp.
Lập trình viên nên đọc bài này để hiểu cách Apple có thể cải thiện tính độc lập và hiệu quả của hệ sinh thái phát triển Swift bằng cách loại bỏ sự phụ thuộc vào GitHub và xây dựng một nền tảng mở, an toàn hơn cho cộng đồng.
SwiftNavigation 2.9.0 introduces two new Swift macros. The first, @CaseBindable, lets you derive bindings to individual enum-case payloads, enabling exhaustive switch statements over SwiftUI Binding<Enum> values to extract typed bindings for each case. The second, @UITransactionEntry, reduces boilerplate when defining custom UITransaction keys — mirroring SwiftUI's @Entry macro but for the library's platform-independent UITransaction type. Both macros are back-deployed to iOS 13.

SwiftUI introduces several new Toolbar APIs giving developers finer control over toolbar item visibility and behavior across platforms. Key additions include the visibilityPriority modifier for ToolbarContent (with automatic, low, and high options), the ToolbarOverflowMenu type for explicitly collapsing groups of items, the topBarPinnedTrailing placement to keep items pinned to the top bar trailing edge, and the toolbarMinimizeBehavior modifier to minimize navigation, tab, bottom, or window bars on scroll. These APIs help balance SwiftUI's adaptive behavior with explicit developer control across iOS, iPadOS, and macOS.
Point-Free is adopting SwiftPM traits across their Swift libraries to let users opt out of transitive dependencies they don't need. Using SwiftNavigation as a test bed, developers can now specify traits like CasePaths and Perception in Package.swift to avoid pulling in libraries like CustomDump, IssueReporting, and Sharing. The Dependencies library also supports traits to omit clock/Combine scheduler registrations and even Foundation/FoundationNetworking for Wasm and Android targets. Xcode provides a new UI for managing these traits. More libraries, including ComposableArchitecture 2.0, are getting the same treatment.