Skip to content

Commit 8b71dd5

Browse files
committed
Update README for version 1.3.0 release
Changes: - Update Swift 6 branch announcement to reflect 1.3.0 release - Add important API note for Xcode 26+ users - Document performAndWaitWithResult naming change - Add migration guide for API changes - Update both English and Chinese READMEs - Add information about upcoming Version 2.0 development
1 parent 6f8ca58 commit 8b71dd5

2 files changed

Lines changed: 92 additions & 28 deletions

File tree

README.md

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,64 @@ Helps you easily handle Core Data's Persistent History Tracking
66

77
[中文版说明](https://github.com/fatbobman/PersistentHistoryTrackingKit/blob/main/READMECN.md)
88

9-
## 🚀 Swift 6 Branch Available
9+
## 🚀 Version 1.3.0 - Swift 6 Compatible
1010

11-
> **🎯 New Swift 6 Compatible Version Available**
11+
> **🎉 Current Version (1.3.0) is Swift 6 Compatible**
1212
>
13-
> We've created a comprehensive **Swift 6 adaptation** with full concurrency safety, true Sendable compliance, and memory leak fixes. The new version is available in the `swift6-adaptation` branch.
13+
> The latest release includes comprehensive Swift 6 concurrency improvements:
1414
>
15-
> **Key Improvements:**
15+
> **What's New in 1.3.0:**
1616
>
17-
> - 🔒 **True Sendable Compliance** - Not just `@unchecked Sendable`
18-
> - 🧵 **Data Race Free** - Comprehensive concurrency testing
19-
> - 🛡️ **Memory Safe** - Zero retain cycles or memory leaks
20-
> - 🧪 **Swift Testing Framework** - Modern testing infrastructure
21-
> - 📚 **Enhanced Documentation** - Comprehensive guides and examples
17+
> -**Swift 6 Compatible** - Works with Swift 6 strict concurrency mode
18+
> - 🔒 **Thread-Safe Task Management** - Protected with DispatchQueue barriers
19+
> - 🧵 **No Retain Cycles** - Uses `[weak self]` to prevent memory leaks
20+
> - 📱 **Xcode 26+ Compatible** - Resolves system API naming conflicts
21+
> - 🚀 **Native Notifications** - Uses iOS 15+ `NotificationCenter.notifications()`
22+
> - 🎯 **Sendable Compliance** - Added `@unchecked Sendable` conformance
2223
>
23-
> **🔄 Try it out:**
24+
> **📦 Install the latest version:**
2425
>
2526
> ```swift
2627
> dependencies: [
27-
> .package(url: "https://github.com/fatbobman/PersistentHistoryTrackingKit.git", branch: "swift6-adaptation")
28+
> .package(url: "https://github.com/fatbobman/PersistentHistoryTrackingKit.git", from: "1.3.0")
2829
> ]
2930
> ```
3031
>
31-
> **📝 Feedback Welcome:**
32-
> Please test the Swift 6 version and [**create an issue**](https://github.com/fatbobman/PersistentHistoryTrackingKit/issues) with your feedback. We'll merge it to main once we have sufficient real-world validation.
32+
> **🔜 Looking ahead:**
3333
>
34-
> **📖 Full Documentation:** [Swift 6 Branch README](https://github.com/fatbobman/PersistentHistoryTrackingKit/blob/swift6-adaptation/README.md)
34+
> We're actively developing **Version 2.0** with:
35+
>
36+
> - Full Swift 6 strict concurrency mode
37+
> - iOS 17+ with Actor-based architecture
38+
> - Built-in Hook callback system
39+
> - Tombstone mechanism for deleted objects
40+
> - Complete Sendable safety without `@unchecked`
41+
>
42+
> Follow progress in the `feature/swift6-optimization-and-hook-system` branch.
43+
44+
## ⚠️ Important API Note for Xcode 26+ Users
45+
46+
Version 1.3.0+ is fully compatible with Xcode 26 (Swift 6.0)
47+
48+
Since Xcode 26 Beta 5, Apple has added a native `performAndWait<T>(_ block: @Sendable () throws -> T) rethrows -> T` method to `NSManagedObjectContext`. To avoid naming conflicts with this system API, we renamed our extension method:
49+
50+
### Old (before 1.3.0)
51+
52+
```swift
53+
// ❌ Conflicts with Xcode 26+ system API
54+
let result = try context.performAndWait { ... }
55+
```
56+
57+
### New (1.3.0+)
58+
59+
```swift
60+
// ✅ Works with all Xcode versions
61+
let result = try context.performAndWaitWithResult { ... }
62+
```
63+
64+
**Migration:** If you were using the old `performAndWait` extension, simply rename it to `performAndWaitWithResult`. The functionality is identical.
65+
66+
For more details, see [Issue #6](https://github.com/fatbobman/PersistentHistoryTrackingKit/issues/6).
3567

3668
## What's This?
3769

READMECN.md

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,64 @@
66

77
[English Version](https://github.com/fatbobman/PersistentHistoryTrackingKit/blob/main/README.md)
88

9-
## 🚀 Swift 6 分支现已可用
9+
## 🚀 版本 1.3.0 - Swift 6 兼容
1010

11-
> **🎯 新的 Swift 6 兼容版本现已可用**
11+
> **🎉 当前版本 (1.3.0) 兼容 Swift 6**
1212
>
13-
> 我们创建了一个全面的 **Swift 6 适配版本**,具备完整的并发安全性、真正的 Sendable 合规性和内存泄漏修复。新版本可在 `swift6-adaptation` 分支中使用。
13+
> 最新版本包含了全面的 Swift 6 并发改进:
1414
>
15-
> **主要改进**
15+
> **1.3.0 新特性**
1616
>
17-
> - 🔒 **真正的 Sendable 合规** - 不仅仅是 `@unchecked Sendable`
18-
> - 🧵 **无数据竞争** - 全面的并发测试
19-
> - 🛡️ **内存安全** - 零保留循环或内存泄漏
20-
> - 🧪 **Swift Testing 框架** - 现代测试基础设施
21-
> - 📚 **增强文档** - 全面的指南和示例
17+
> -**Swift 6 兼容** - 支持 Swift 6 严格并发模式
18+
> - 🔒 **线程安全的任务管理** - 使用 DispatchQueue 屏障保护
19+
> - 🧵 **无内存泄漏** - 使用 `[weak self]` 防止循环引用
20+
> - 📱 **Xcode 26+ 兼容** - 解决系统 API 命名冲突
21+
> - 🚀 **原生通知** - 使用 iOS 15+ `NotificationCenter.notifications()`
22+
> - 🎯 **Sendable 合规** - 添加 `@unchecked Sendable` 一致性
2223
>
23-
> **🔄 试用方法**
24+
> **📦 安装最新版本**
2425
>
2526
> ```swift
2627
> dependencies: [
27-
> .package(url: "https://github.com/fatbobman/PersistentHistoryTrackingKit.git", branch: "swift6-adaptation")
28+
> .package(url: "https://github.com/fatbobman/PersistentHistoryTrackingKit.git", from: "1.3.0")
2829
> ]
2930
> ```
3031
>
31-
> **📝 欢迎反馈:**
32-
> 请测试 Swift 6 版本并[**创建 issue**](https://github.com/fatbobman/PersistentHistoryTrackingKit/issues) 提供您的反馈。一旦我们获得足够的实际使用验证,就会将其合并到 main 分支。
32+
> **🔜 展望未来:**
3333
>
34-
> **📖 完整文档:** [Swift 6 分支 README](https://github.com/fatbobman/PersistentHistoryTrackingKit/blob/swift6-adaptation/READMECN.md)
34+
> 我们正在积极开发 **版本 2.0**,包含:
35+
>
36+
> - 完整的 Swift 6 严格并发模式
37+
> - iOS 17+ 基于 Actor 的架构
38+
> - 内置 Hook 回调系统
39+
> - 删除对象的墓碑机制
40+
> - 完全的 Sendable 安全性(无需 `@unchecked`)
41+
>
42+
> 在 `feature/swift6-optimization-and-hook-system` 分支关注开发进度
43+
44+
## ⚠️ Xcode 26+ 用户重要 API 说明
45+
46+
**版本 1.3.0+ 完全兼容 Xcode 26 (Swift 6.0)**
47+
48+
从 Xcode 26 Beta 5 开始,Apple 为 `NSManagedObjectContext` 添加了原生的 `performAndWait<T>(_ block: @Sendable () throws -> T) rethrows -> T` 方法为了避免与系统 API 命名冲突,我们重命名了扩展方法:
49+
50+
### 旧版本 (1.3.0 之前)
51+
52+
```swift
53+
// ❌ 与 Xcode 26+ 系统API冲突
54+
let result = try context.performAndWait { ... }
55+
```
56+
57+
### 新版本 (1.3.0+)
58+
59+
```swift
60+
// ✅ 兼容所有 Xcode 版本
61+
let result = try context.performAndWaitWithResult { ... }
62+
```
63+
64+
**迁移指南:** 如果您之前使用的是旧的 `performAndWait` 扩展,只需将其重命名为 `performAndWaitWithResult`。功能完全相同。
65+
66+
更多详情请参阅 [Issue #6](https://github.com/fatbobman/PersistentHistoryTrackingKit/issues/6)
3567

3668
## What's This?
3769

0 commit comments

Comments
 (0)