Skip to content

Commit

Permalink
Merge pull request #295 from xmtp/np/stream-rust-updates
Browse files Browse the repository at this point in the history
Rust iOS Streaming Updates
  • Loading branch information
nplasterer authored Mar 6, 2024
2 parents 622c733 + 0b524eb commit 22d94f4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
14 changes: 7 additions & 7 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PODS:
- hermes-engine/Pre-built (= 0.71.14)
- hermes-engine/Pre-built (0.71.14)
- libevent (2.1.12)
- LibXMTP (0.4.2-beta3)
- LibXMTP (0.4.2-beta5)
- Logging (1.0.0)
- MessagePacker (0.4.7)
- MMKV (1.3.3):
Expand Down Expand Up @@ -446,16 +446,16 @@ PODS:
- GenericJSON (~> 2.0)
- Logging (~> 1.0.0)
- secp256k1.swift (~> 0.1)
- XMTP (0.8.14):
- XMTP (0.8.15):
- Connect-Swift (= 0.3.0)
- GzipSwift
- LibXMTP (= 0.4.2-beta3)
- LibXMTP (= 0.4.2-beta5)
- web3.swift
- XMTPReactNative (0.1.0):
- ExpoModulesCore
- MessagePacker
- secp256k1.swift
- XMTP (= 0.8.14)
- XMTP (= 0.8.15)
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -705,7 +705,7 @@ SPEC CHECKSUMS:
GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa
hermes-engine: d7cc127932c89c53374452d6f93473f1970d8e88
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
LibXMTP: d6e1d416c7138b3593dfd7a6f07c8e88537c00eb
LibXMTP: 3cbd1d0dd44ae3648f571a0e81bbe73565759e67
Logging: 9ef4ecb546ad3169398d5a723bc9bea1c46bef26
MessagePacker: ab2fe250e86ea7aedd1a9ee47a37083edd41fd02
MMKV: f902fb6719da13c2ab0965233d8963a59416f911
Expand Down Expand Up @@ -756,8 +756,8 @@ SPEC CHECKSUMS:
secp256k1.swift: a7e7a214f6db6ce5db32cc6b2b45e5c4dd633634
SwiftProtobuf: b02b5075dcf60c9f5f403000b3b0c202a11b6ae1
web3.swift: 2263d1e12e121b2c42ffb63a5a7beb1acaf33959
XMTP: f716708390140ef0542425898888e2346e04174e
XMTPReactNative: 145687cf515815fcc26f89e4347c44814708981b
XMTP: 00fe090825e6bc5991870c1925befc06b1a30b78
XMTPReactNative: c452a9190442c7cbc0a4c0676cfc598761d463d2
Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9

PODFILE CHECKSUM: 95d6ace79946933ecf80684613842ee553dd76a2
Expand Down
17 changes: 13 additions & 4 deletions example/src/tests/groupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ test('can message in a group', async () => {
throw new Error("newest message should be 'hello, world'")
}
// Bob can send a message
bobGroups[0].send('hey guys!')
await bobGroups[0].send('hey guys!')

// Cam's num groups == 1
const camGroups = await camClient.conversations.listGroups()
Expand All @@ -289,12 +289,21 @@ test('can message in a group', async () => {
}

// Cam can read messages from Alice and Bob
await camGroups[0].sync()
const camMessages = await camGroups[0].messages()
if (camMessages[1].content() !== 'gm') {
throw new Error("second Message should be 'gm'")

if (camMessages.length !== 3) {
throw new Error(`length should be 3 but was ${camMessages.length}`)
}
if (camMessages[0].content() !== 'hey guys!') {
throw new Error("newest Message should be 'hey guys!'")
throw new Error(
`newest Message should be 'hey guys!' but was ${camMessages[0].content()}`
)
}
if (camMessages[1].content() !== 'gm') {
throw new Error(
`second Message should be 'gm' but was ${camMessages[1].content()}`
)
}

return true
Expand Down
2 changes: 1 addition & 1 deletion ios/XMTPReactNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Pod::Spec.new do |s|
s.source_files = "**/*.{h,m,swift}"
s.dependency 'secp256k1.swift'
s.dependency "MessagePacker"
s.dependency "XMTP", "= 0.8.14"
s.dependency "XMTP", "= 0.8.15"
end

0 comments on commit 22d94f4

Please sign in to comment.