Cross-Language Serialization
Fory Swift can exchange payloads with other Fory runtimes using the xlang protocol.
Recommended Cross-language Configuration
let fory = Fory(xlang: true, trackRef: false, compatible: true)
Register Types with Shared Identity
ID-based registration
@ForyObject
struct Order {
var id: Int64 = 0
var amount: Double = 0
}
let fory = Fory(xlang: true, compatible: true)
fory.register(Order.self, id: 100)
Name-based registration
try fory.register(Order.self, namespace: "com.example", name: "Order")