Skip to content

Commit

Permalink
chore: release v1.0.0-alpha.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Leeeon233 committed Oct 10, 2024
1 parent a83c588 commit a0884e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
16 changes: 8 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import PackageDescription

let FFIbinaryTarget: PackageDescription.Target

// if ProcessInfo.processInfo.environment["LOCAL_BUILD"] != nil {
if ProcessInfo.processInfo.environment["LOCAL_BUILD"] != nil {
FFIbinaryTarget = .binaryTarget(name: "LoroFFI", path: "./loroFFI.xcframework.zip")
// }else {
// FFIbinaryTarget = .binaryTarget(
// name: "LoroFFI",
// url: "https://github.com/loro-dev/loro-swift/releases/download/0.16.2-alpha.3/loroFFI.xcframework.zip",
// checksum: "9475660c4fcee609a498212b8ca038278b34c1325b30fece0ce5740d4025377a"
// )
// }
}else {
FFIbinaryTarget = .binaryTarget(
name: "LoroFFI",
url: "https://github.com/loro-dev/loro-swift/releases/download/1.0.0-alpha.5/loroFFI.xcframework.zip",
checksum: "2b9c11aecf4f90ead28e12c8487b072e3fc406885e91ab2d1999b8c83040bd6c"
)
}

let package = Package(
name: "Loro",
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you have any suggestions for API, please feel free to create an issue or join
- [x] Checkout
- [x] Subscribe Event
- [x] UndoManager
- [ ] Bindings for all types in Loro
- [x] Bindings for all types in Loro
- [ ] Tests
- [ ] Benchmarks

Expand All @@ -37,7 +37,7 @@ let package = Package(
products: [......],
dependencies:[
...,
.package(url: "https://github.com/loro-dev/loro-swift.git", from: "0.16.2-alpha.3")
.package(url: "https://github.com/loro-dev/loro-swift.git", from: "1.0.0-alpha.5")
],
targets:[
.executableTarget(
Expand Down Expand Up @@ -66,20 +66,18 @@ let s = text.toString()
// XCTAssertEqual(s, "bc")

// subscribe the event
let subId = doc.subscribeRoot{ diffEvent in
let sub = doc.subscribeRoot{ diffEvent in
print(diffEvent)
}
// unsubscribe
doc.unsubscribe(subId: id)

// export updates or snapshot
let doc2 = LoroDoc()
let snapshot = doc.exportSnapshot()
let updates = doc.exportFrom(vv: VersionVector())

// import updates or snapshot
try! doc2.import(snapshot)
try! doc2.import(updates)
let status = try! doc2.import(snapshot)
let status2 = try! doc2.import(updates)
// import batch of updates or snapshot
try! doc2.importBatch(bytes: [snapshot, updates])

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_swift_ffi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ XCFRAMEWORK_FOLDER="$THIS_SCRIPT_DIR/../${FRAMEWORK_NAME}.xcframework"
# (as of 10/10/23), but leaving it open to float seems less useful than
# moving the pinning forward, since Catalyst support (target macabi) still
# requires an active, nightly toolchain.
RUST_NIGHTLY="nightly-2024-05-23"
RUST_NIGHTLY="nightly-2024-10-09"

echo "Install nightly and rust-src for Catalyst"
rustup toolchain install ${RUST_NIGHTLY}
Expand Down

0 comments on commit a0884e1

Please sign in to comment.