Skip to content

Commit 506cb1e

Browse files
fatbobmanclaude
andcommitted
Update dependencies and apply code formatting
- Updated swift-async-algorithms from 0.0.1 to 1.0.0 - Added swift-collections dependency (1.2.0) - Applied consistent markdown formatting (bullet points, spacing) - Updated badge syntax with alt text for accessibility - Minor spacing and formatting improvements throughout README files These are maintenance updates to keep dependencies current and formatting consistent. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 72912f7 commit 506cb1e

4 files changed

Lines changed: 49 additions & 38 deletions

File tree

Package.resolved

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let package = Package(
2222
dependencies: [
2323
// Dependencies declare other packages that this package depends on.
2424
// .package(url: /* package url */, from: "1.0.0"),
25-
.package(url: "https://github.com/apple/swift-async-algorithms", from: "0.0.1"),
25+
.package(url: "https://github.com/apple/swift-async-algorithms", from: "1.0.0"),
2626
],
2727
targets: [
2828
// Targets are the basic building blocks of a package. A target can define a module or a test suite.

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@
22

33
Helps you easily handle Core Data's Persistent History Tracking
44

5-
![](https://img.shields.io/badge/Platform%20Compatibility-iOS%20|%20macOS%20|%20tvOS%20|%20watchOs-red) ![](https://img.shields.io/badge/Swift%20Compatibility-5.5-red)
5+
![os](https://img.shields.io/badge/Platform%20Compatibility-iOS%20|%20macOS%20|%20tvOS%20|%20watchOs-red) ![swift](https://img.shields.io/badge/Swift%20Compatibility-5.5-red)
66

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

9-
## 🚀 Swift 6 Branch Available!
9+
## 🚀 Swift 6 Branch Available
1010

1111
> **🎯 New Swift 6 Compatible Version Available**
12-
>
12+
>
1313
> 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.
1414
>
1515
> **✨ Key Improvements:**
16+
>
1617
> - 🔒 **True Sendable Compliance** - Not just `@unchecked Sendable`
1718
> - 🧵 **Data Race Free** - Comprehensive concurrency testing
1819
> - 🛡️ **Memory Safe** - Zero retain cycles or memory leaks
1920
> - 🧪 **Swift Testing Framework** - Modern testing infrastructure
2021
> - 📚 **Enhanced Documentation** - Comprehensive guides and examples
2122
>
2223
> **🔄 Try it out:**
24+
>
2325
> ```swift
2426
> dependencies: [
2527
> .package(url: "https://github.com/fatbobman/PersistentHistoryTrackingKit.git", branch: "swift6-adaptation")
@@ -45,13 +47,13 @@ The **Persistent History Tracking Kit** will automate the above process for you.
4547
4648
Upon receiving a remote notification of Persistent History Tracking from Core Data, Persistent History Tracking Kit will do the following:
4749
48-
* Query the current author's (current author) last merge transaction time
49-
* Get new transactions created by other applications, application extensions, background contexts, etc. (all authors) in addition to this application since the date of the last merged transaction
50-
* Merge the new transaction into the specified context (usually the current application's view context)
51-
* Update the current application's merge transaction time
52-
* Clean up transactions that have been merged by all applications
50+
- Query the current author's (current author) last merge transaction time
51+
- Get new transactions created by other applications, application extensions, background contexts, etc. (all authors) in addition to this application since the date of the last merged transaction
52+
- Merge the new transaction into the specified context (usually the current application's view context)
53+
- Update the current application's merge transaction time
54+
- Clean up transactions that have been merged by all applications
5355
54-
For more specific details on how this works, read [在 CoreData 中使用持久化历史跟踪](https://fatbobman.com/zh/posts/persistenthistorytracking/) or [Using Persistent History Tracking in CoreData ](https://fatbobman.com/en/posts/persistenthistorytracking/).
56+
For more specific details on how this works, read [在 CoreData 中使用持久化历史跟踪](https://fatbobman.com/zh/posts/persistenthistorytracking/) or [Using Persistent History Tracking in CoreData](https://fatbobman.com/en/posts/persistenthistorytracking/).
5557
5658
## Usage
5759
@@ -114,15 +116,14 @@ allAuthors: ["appAuthor", "extensionAuthor", "appBatchAuthor"],
114116
115117
Whether or not to merge network data imported by Core Data with CloudKit, is only used in scenarios where the Core Data cloud sync state needs to be switched in real time. See [Switching Core Data Cloud Sync Status in Real-Time](https://fatbobman.com/en/posts/real-time-switching-of-cloud-syncs-status/) for details on usage
116118
117-
### batchAuthors
119+
### batchAuthors
118120
119121
Some authors (such as background contexts for batch changes) only create transactions and do not merge and clean up transactions generated by other authors. You can speed up the cleanup of such transactions by setting them in batchAuthors.
120122
121123
```swift
122124
batchAuthors: ["appBatchAuthor"],
123125
```
124126
125-
126127
Even if not set, these transactions will be automatically cleared after reaching maximumDuration.
127128
128129
### maximumDuration
@@ -159,15 +160,15 @@ userDefaults: appGroupUserDefaults,
159160
160161
Persistent History Tracking Kit currently supports three transaction cleanup strategies:
161162
162-
* none
163+
- none
163164
164165
Merge only, no cleanup
165166
166-
* byDuration
167+
- byDuration
167168
168169
Set a minimum time interval between cleanups
169170
170-
* byNotification
171+
- byNotification
171172
172173
Set the minimum number of notifications between cleanups
173174
@@ -222,9 +223,9 @@ logger:MyLogger(),
222223
223224
The output of log messages can be controlled by setting logLevel:
224225
225-
* 0 Turn off log output
226-
* 1 Important status only
227-
* 2 Detail information
226+
- 0 Turn off log output
227+
- 1 Important status only
228+
- 2 Detail information
228229
229230
### autoStart
230231

READMECN.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@
22

33
帮助您轻松处理 Core Data 的持久性历史跟踪。
44

5-
![](https://img.shields.io/badge/Platform%20Compatibility-iOS%20|%20macOS%20|%20tvOS%20|%20watchOs-red) ![](https://img.shields.io/badge/Swift%20Compatibility-5.5-red)
5+
![os](https://img.shields.io/badge/Platform%20Compatibility-iOS%20|%20macOS%20|%20tvOS%20|%20watchOs-red) ![swift](https://img.shields.io/badge/Swift%20Compatibility-5.5-red)
66

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

9-
## 🚀 Swift 6 分支现已可用
9+
## 🚀 Swift 6 分支现已可用
1010

1111
> **🎯 新的 Swift 6 兼容版本现已可用**
12-
>
12+
>
1313
> 我们创建了一个全面的 **Swift 6 适配版本**,具备完整的并发安全性、真正的 Sendable 合规性和内存泄漏修复。新版本可在 `swift6-adaptation` 分支中使用。
1414
>
1515
> **✨ 主要改进:**
16+
>
1617
> - 🔒 **真正的 Sendable 合规** - 不仅仅是 `@unchecked Sendable`
1718
> - 🧵 **无数据竞争** - 全面的并发测试
1819
> - 🛡️ **内存安全** - 零保留循环或内存泄漏
1920
> - 🧪 **Swift Testing 框架** - 现代测试基础设施
2021
> - 📚 **增强文档** - 全面的指南和示例
2122
>
2223
> **🔄 试用方法:**
24+
>
2325
> ```swift
2426
> dependencies: [
2527
> .package(url: "https://github.com/fatbobman/PersistentHistoryTrackingKit.git", branch: "swift6-adaptation")
@@ -45,13 +47,13 @@
4547
4648
在接收到 Core Data 发送的持久历史记录跟踪远程通知后,Persistent History Tracking Kit 将进行如下工作:
4749
48-
* 查询当前应用的(current author)上次合并事务的时间
49-
* 获取从上次合并事务日期后,除了本应用程序外,由其他应用程序应用程序扩展后台上下文等(all authors)新创建的事务
50-
* 将新的事务合并到指定的上下文中(通常是当前应用程序的视图上下文)
51-
* 更新当前应用程序的合并事务时间
52-
* 清理已被所有应用合并后的事务
50+
- 查询当前应用的(current author)上次合并事务的时间
51+
- 获取从上次合并事务日期后,除了本应用程序外,由其他应用程序应用程序扩展后台上下文等(all authors)新创建的事务
52+
- 将新的事务合并到指定的上下文中(通常是当前应用程序的视图上下文)
53+
- 更新当前应用程序的合并事务时间
54+
- 清理已被所有应用合并后的事务
5355
54-
更具体的工作原理和细节,可以阅读 [在 CoreData 中使用持久化历史跟踪](https://fatbobman.com/zh/posts/persistenthistorytracking/) 或者 [Using Persistent History Tracking in CoreData ](https://fatbobman.com/en/posts/persistenthistorytracking/)。
56+
更具体的工作原理和细节,可以阅读 [在 CoreData 中使用持久化历史跟踪](https://fatbobman.com/zh/posts/persistenthistorytracking/) 或者 [Using Persistent History Tracking in CoreData](https://fatbobman.com/en/posts/persistenthistorytracking/)。
5557
5658
## 使用方法
5759
@@ -114,7 +116,7 @@ allAuthors: ["appAuthor", "extensionAuthor", "appBatchAuthor"],
114116
115117
是否合并由 Core Data with CloudKit 导入的网络数据,仅用于需要实时切换 Core Data 云同步状态的场景具体用法请参阅 [实时切换 Core Data 的云同步状态](https://fatbobman.com/zh/posts/real-time-switching-of-cloud-syncs-status/)
116118
117-
### batchAuthors
119+
### batchAuthors
118120
119121
某些 author(例如用于批量更改的后台上下文)只会创建事务,并不会对其他 author 的产生事务进行合并和清理通过将其设置在 batchAuthors 中,可以加速该类事务的清理
120122
@@ -158,15 +160,15 @@ userDefaults: appGroupUserDefaults,
158160
159161
Persistent History Tracking Kit 目前支持三种事务清理策略:
160162
161-
* none
163+
- none
162164
163165
只合并,不清理
164166
165-
* byDuration
167+
- byDuration
166168
167169
设定两次清理之间的最小时间间隔
168170
169-
* byNotification
171+
- byNotification
170172
171173
设定两次清理之间的最小通知次数间隔
172174
@@ -221,9 +223,9 @@ logger:MyLogger(),
221223
222224
通过设定 logLevel 可以控制日志信息的输出:
223225
224-
* 0 关闭日志输出
225-
* 1 仅重要状态
226-
* 2 详细信息
226+
- 0 关闭日志输出
227+
- 1 仅重要状态
228+
- 2 详细信息
227229
228230
### autoStart
229231
@@ -259,4 +261,3 @@ dependencies: [
259261
## License
260262
261263
This library is released under the MIT license. See [LICENSE](https://github.com/fatbobman/persistentHistoryTrackingKit/blob/main/LICENSE) for details.
262-

0 commit comments

Comments
 (0)