You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the notification service extension, I’m unable to retrieve events using backgroundSyncService.
I’m currently using version 0.27.6 of the Matrix SDK.
When a user logs out, I call the following code to remove the pusher:
Once the user logs back in, I re-register the pusher. However, when a notification arrives in the notification service extension, the backgroundSyncService doesn’t retrieve events; neither the success nor failure blocks are triggered.
Additionally, the mxRestClient mxRestClient.presence(forUser: userId, completion: { _ in }) function behaves similarly, as it isn’t calling the completion block.
private var backgroundSyncService: MXBackgroundSyncService? {
guard let userCredentials else { return nil }
return MXBackgroundSyncService(withCredentials: userCredentials)
}
func getEvent(eventId: String, roomId: String, completion: @escaping (MXEvent?) -> Void) {
guard let backgroundSyncService else {
Logger().log("backgroundSyncService Not Found")
return
}
Logger().log("backgroundSyncService Found")
backgroundSyncService.event(withEventId: eventId, inRoom: roomId, allowSync: false, completion: { response in
switch response {
case .success(let event):
completion(event)
case .failure:
completion(nil)
}
})
}
The text was updated successfully, but these errors were encountered:
In the notification service extension, I’m unable to retrieve events using backgroundSyncService.
I’m currently using version 0.27.6 of the Matrix SDK.
When a user logs out, I call the following code to remove the pusher:
Once the user logs back in, I re-register the pusher. However, when a notification arrives in the notification service extension, the backgroundSyncService doesn’t retrieve events; neither the success nor failure blocks are triggered.
Additionally, the mxRestClient
mxRestClient.presence(forUser: userId, completion: { _ in })
function behaves similarly, as it isn’t calling the completion block.The text was updated successfully, but these errors were encountered: