#swift
9 posts
November 1, 2026
Migrating from XCTest to Swift Testing
Convert XCTest unit tests to Swift Testing: @Test, #expect and #require, suites, parameterized tests, traits, async confirmations, and what stays in XCTest.
November 1, 2026
从 XCTest 迁移到 Swift Testing
把 XCTest 单元测试改成 Swift Testing:@Test、#expect 与 #require、套件、参数化测试、特性、异步确认,以及哪些测试继续留在 XCTest。
November 1, 2026
Syncing SwiftData with CloudKit
Set up SwiftData sync through CloudKit: capabilities, ModelConfiguration, the model rules CloudKit imposes, schema deployment to production and private-database scope.
November 1, 2026
用 CloudKit 同步 SwiftData
让 SwiftData 通过 CloudKit 同步:所需能力、ModelConfiguration、CloudKit 对模型的要求、把架构部署到生产环境,以及只同步到私有数据库。
November 1, 2026
Verifying StoreKit 2 transactions
VerificationResult, current entitlements, the Transaction.updates listener, finish(), appAccountToken, revocation and environment, and checking the signed JWS on your server.
November 1, 2026
验证 StoreKit 2 交易
VerificationResult、当前权益、Transaction.updates 监听、finish()、appAccountToken、退款撤销与环境,以及在服务器上校验带签名的 JWS。
November 1, 2026
App Intents and App Shortcuts in Swift
How to write an AppIntent with parameters, add an AppEntity and EntityQuery, return a dialog or a value, choose supportedModes, and ship App Shortcuts phrases.
November 1, 2026
Swift 的 App Intents 与 App Shortcuts 指南
怎么写带参数的 AppIntent、用 AppEntity 和 EntityQuery 描述数据、返回对话或数值、选择 supportedModes,以及怎么写 App Shortcuts 的口令。
June 25, 2026
Batch convert HEIC to JPG on Mac with a script: quality, resize and location
Convert a whole folder of HEIC photos to JPG on a Mac with a shell loop or a short Swift script: set the quality, cap the size, and drop GPS while keeping the other EXIF. Nothing is uploaded.