Skip to content

Commit

Permalink
fixes exportNativeLogs on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Jan 23, 2025
1 parent 4cff9d7 commit bb3ae79
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ PODS:
- CSecp256k1 (~> 0.2)
- LibXMTP (= 3.0.20)
- SQLCipher (= 4.5.7)
- XMTPReactNative (3.1.7):
- XMTPReactNative (3.1.8):
- CSecp256k1 (~> 0.2)
- ExpoModulesCore
- MessagePacker
Expand Down Expand Up @@ -763,7 +763,7 @@ SPEC CHECKSUMS:
SQLCipher: 5e6bfb47323635c8b657b1b27d25c5f1baf63bf5
SwiftProtobuf: 4dbaffec76a39a8dc5da23b40af1a5dc01a4c02d
XMTP: 3d82fe8598fe043a67ad93276084ab46a30a1fa3
XMTPReactNative: cd9144370b01abf420c74dd773a82ca0c1a8633b
XMTPReactNative: f0b7d6a9314de5ba377cc5d3d89ecd896cd564d5
Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9

PODFILE CHECKSUM: 0e6fe50018f34e575d38dc6a1fdf1f99c9596cdd
Expand Down
10 changes: 10 additions & 0 deletions example/src/tests/groupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ function test(name: string, perform: () => Promise<boolean>) {
groupTests.push({ name: String(counter++) + '. ' + name, run: perform })
}

test('verify exportNativeLogs', async () => {
await createClients(2)
const logs = await Client.exportNativeLogs()
assert(
logs.includes('Created XMTP client for inbox_id'),
'Logs should contain Initialized identity inbox_id='
)
return true
})

test('can create a group with inbox ids default permissions', async () => {
const [alix, bo, caro] = await createClients(3)

Expand Down
4 changes: 1 addition & 3 deletions ios/XMTPModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1934,9 +1934,7 @@ public class XMTPModule: Module {
let entries = try logStore.getEntries(at: position)

for entry in entries {
if let logEntry = entry as? OSLogEntryLog,
logEntry.composedMessage.contains("libxmtp")
{
if let logEntry = entry as? OSLogEntryLog {
logOutput.append(
"\(logEntry.date): \(logEntry.composedMessage)\n"
)
Expand Down

0 comments on commit bb3ae79

Please sign in to comment.