xmtp / xmtp-react-native

A package you can use to build with XMTP in a React Native or Expo app.
MIT License
41 stars 19 forks source link

Feature request: handling push notification in native extensions #35

Closed nmalzieu closed 1 year ago

nmalzieu commented 1 year ago

Is your feature request related to a problem?

Right now on Converse, we use XMTP JS in a webview. To decode notifications, we developed native notifications extensions in Kotlin & Swift. These notifications extensions are the only way to have the best notification experience: ability to decode notifications very fast, even with bad connection, even if the app was killed manually by the user

To decode notifications, we export from the JS SDK the XMTP private key + each conversation's information (like the key material for ConversationV2 that we get using xmtpClient.keystore.lookupTopic) and save them to the secure enclave of the phone

Then the native SDKs use this information to instantiate a conversation very fast without using conversations.list() then decode the notification.

Describe the solution to the problem

I see three solutions:

Describe the uses cases for the feature

No response

Additional details

No response

nplasterer commented 1 year ago

I think the items needed here for handling push notifications should be present. Please reopen if you still need something. 🙏