This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git
The following commit(s) were added to refs/heads/main by this push:
new b840fae205 🔄 synced local 'docs/guide/' with remote 'docs/guide/'
b840fae205 is described below
commit b840fae205297d52fa73182077dc70e814aad75f
Author: chaokunyang <[email protected]>
AuthorDate: Fri Feb 20 06:57:07 2026 +0000
🔄 synced local 'docs/guide/' with remote 'docs/guide/'
---
docs/guide/swift/_category_.json | 6 ++++++
docs/guide/swift/configuration.md | 12 ++++++------
docs/guide/swift/cross-language.md | 4 ++--
docs/guide/swift/index.md | 18 ++++++++++++++++++
docs/guide/swift/references.md | 6 +++---
docs/guide/swift/schema-evolution.md | 6 +++---
docs/guide/xlang/_category_.json | 4 ++--
7 files changed, 40 insertions(+), 16 deletions(-)
diff --git a/docs/guide/swift/_category_.json b/docs/guide/swift/_category_.json
new file mode 100644
index 0000000000..3a9187fed7
--- /dev/null
+++ b/docs/guide/swift/_category_.json
@@ -0,0 +1,6 @@
+{
+ "label": "Swift",
+ "position": 9,
+ "collapsible": true,
+ "collapsed": true
+}
diff --git a/docs/guide/swift/configuration.md
b/docs/guide/swift/configuration.md
index 3ff8f03d38..4c037513fd 100644
--- a/docs/guide/swift/configuration.md
+++ b/docs/guide/swift/configuration.md
@@ -49,7 +49,7 @@ Controls cross-language protocol mode.
- `false`: Use Swift-native mode
```swift
-let fory = Fory(config: .init(xlang: true))
+let fory = Fory(xlang: true)
```
### `trackRef`
@@ -60,7 +60,7 @@ Enables shared/circular reference tracking for
reference-trackable types.
- `true`: Preserve object identity for class/reference graphs
```swift
-let fory = Fory(config: .init(xlang: true, trackRef: true))
+let fory = Fory(xlang: true, trackRef: true)
```
### `compatible`
@@ -71,7 +71,7 @@ Enables compatible schema mode for evolution across versions.
- `true`: Compatible mode (supports add/remove/reorder fields)
```swift
-let fory = Fory(config: .init(xlang: true, trackRef: false, compatible: true))
+let fory = Fory(xlang: true, trackRef: false, compatible: true)
```
## Recommended Presets
@@ -79,17 +79,17 @@ let fory = Fory(config: .init(xlang: true, trackRef: false,
compatible: true))
### Local, strict schema
```swift
-let fory = Fory(config: .init(xlang: false, trackRef: false, compatible:
false))
+let fory = Fory(xlang: false, trackRef: false, compatible: false)
```
### Cross-language service payloads
```swift
-let fory = Fory(config: .init(xlang: true, trackRef: false, compatible: true))
+let fory = Fory(xlang: true, trackRef: false, compatible: true)
```
### Graph/object identity workloads
```swift
-let fory = Fory(config: .init(xlang: true, trackRef: true, compatible: true))
+let fory = Fory(xlang: true, trackRef: true, compatible: true)
```
diff --git a/docs/guide/swift/cross-language.md
b/docs/guide/swift/cross-language.md
index 896141f3f2..f4b1781a4d 100644
--- a/docs/guide/swift/cross-language.md
+++ b/docs/guide/swift/cross-language.md
@@ -24,7 +24,7 @@ Fory Swift can exchange payloads with other Fory runtimes
using the xlang protoc
## Recommended Cross-language Configuration
```swift
-let fory = Fory(config: .init(xlang: true, trackRef: false, compatible: true))
+let fory = Fory(xlang: true, trackRef: false, compatible: true)
```
## Register Types with Shared Identity
@@ -38,7 +38,7 @@ struct Order {
var amount: Double = 0
}
-let fory = Fory(config: .init(xlang: true, compatible: true))
+let fory = Fory(xlang: true, compatible: true)
fory.register(Order.self, id: 100)
```
diff --git a/docs/guide/swift/index.md b/docs/guide/swift/index.md
index a7f0373c70..6914a17720 100644
--- a/docs/guide/swift/index.md
+++ b/docs/guide/swift/index.md
@@ -30,6 +30,24 @@ Apache Fory Swift provides high-performance object graph
serialization with stro
- Built-in support for dynamic values (`Any`, `AnyObject`, `any Serializer`,
`AnyHashable`)
- Reference tracking for shared/circular graphs, including weak references on
classes
+## Install
+
+Add Fory Swift from the Apache Fory GitHub repository:
+
+```swift
+dependencies: [
+ .package(url: "https://github.com/apache/fory.git", exact: "$version")
+],
+targets: [
+ .target(
+ name: "MyApp",
+ dependencies: [
+ .product(name: "Fory", package: "fory")
+ ]
+ )
+]
+```
+
## Guide Contents
- [Configuration](configuration.md)
diff --git a/docs/guide/swift/references.md b/docs/guide/swift/references.md
index 36f97e4902..7267585196 100644
--- a/docs/guide/swift/references.md
+++ b/docs/guide/swift/references.md
@@ -24,7 +24,7 @@ Swift reference tracking is controlled by
`ForyConfig.trackRef`.
## Enable Reference Tracking
```swift
-let fory = Fory(config: .init(xlang: true, trackRef: true, compatible: false))
+let fory = Fory(xlang: true, trackRef: true, compatible: false)
```
When enabled, reference-trackable types preserve identity and cycles.
@@ -58,7 +58,7 @@ final class AnimalPair {
}
}
-let fory = Fory(config: .init(xlang: true, trackRef: true))
+let fory = Fory(xlang: true, trackRef: true)
fory.register(Animal.self, id: 200)
fory.register(AnimalPair.self, id: 201)
@@ -92,7 +92,7 @@ final class Node {
}
}
-let fory = Fory(config: .init(xlang: true, trackRef: true))
+let fory = Fory(xlang: true, trackRef: true)
fory.register(Node.self, id: 300)
let node = Node(value: 7)
diff --git a/docs/guide/swift/schema-evolution.md
b/docs/guide/swift/schema-evolution.md
index 958c0da4fe..3ae00f0863 100644
--- a/docs/guide/swift/schema-evolution.md
+++ b/docs/guide/swift/schema-evolution.md
@@ -24,7 +24,7 @@ Fory supports schema evolution through compatible mode.
## Enable Compatible Mode
```swift
-let fory = Fory(config: .init(xlang: true, trackRef: false, compatible: true))
+let fory = Fory(xlang: true, trackRef: false, compatible: true)
```
## Example: Evolving a Struct
@@ -46,10 +46,10 @@ struct PersonV2 {
var phone: String? = nil // added field
}
-let writer = Fory(config: .init(xlang: true, compatible: true))
+let writer = Fory(xlang: true, compatible: true)
writer.register(PersonV1.self, id: 1)
-let reader = Fory(config: .init(xlang: true, compatible: true))
+let reader = Fory(xlang: true, compatible: true)
reader.register(PersonV2.self, id: 1)
let v1 = PersonV1(name: "alice", age: 30, address: "main st")
diff --git a/docs/guide/xlang/_category_.json b/docs/guide/xlang/_category_.json
index ca357e9134..1884f53d1e 100644
--- a/docs/guide/xlang/_category_.json
+++ b/docs/guide/xlang/_category_.json
@@ -1,6 +1,6 @@
{
"label": "Cross Language",
- "position": 18,
+ "position": 10,
"collapsible": true,
"collapsed": true
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]