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:
mimic the solution we have today : give a way to export the key materials like xmtpClient.keystore.lookupTopic from the React Native SDK to save to secure enclave.
have a solution using the Keystore : the RN SDK could automatically cache this data to the secure enclave by itself. When logging in and pulling conversations, they would be cached to the secure enclave. Then, in the native extensions in Swift and Kotlin, we would be able to instantiate a cached client using just the user's address, then be able to instantiate a cached conversation just using its topic, without ever having to handle this manually
if we have the solution above, we can also think of having helpers in the RN SDK that handle of of the decoding and displaying of the notification for us. However it would need to be really configurable because we do a lot more than just displaying the conversation (we pass more data in the conversation, we subscribe to topics for new convos on our own notification backend, we save decoded messages so they're displayed in the app as soon as you open the app, etc…). I would say solution 2/ is more than enough for now!
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 usingxmtpClient.keystore.lookupTopic
) and save them to the secure enclave of the phoneThen 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:
xmtpClient.keystore.lookupTopic
from the React Native SDK to save to secure enclave.Describe the uses cases for the feature
No response
Additional details
No response