fix: iOS 16 realm crash

This commit is contained in:
ronaldheft
2022-09-17 17:47:18 -04:00
parent fdc829d06c
commit 7ccd8db085
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ public class AbsAudioPlayer: CAPPlugin {
func restorePlaybackSession() async {
do {
// Fetch the most recent active session
let activeSession = try await Realm().objects(PlaybackSession.self).where({
let activeSession = try Realm(queue: nil).objects(PlaybackSession.self).where({
$0.isActiveSession == true && $0.serverConnectionConfigId == Store.serverConfig?.id
}).last?.freeze()