From 6478fbf03e4a8aaeb9d2fa024f8d0396962a8359 Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Mon, 9 Sep 2024 17:18:05 +0200 Subject: [PATCH] Avoid using sync when dispatching to main queue (risk deadlock when entering foreground) --- Linphone/Contacts/ContactsManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linphone/Contacts/ContactsManager.swift b/Linphone/Contacts/ContactsManager.swift index c635f5290..ad3c8c43a 100644 --- a/Linphone/Contacts/ContactsManager.swift +++ b/Linphone/Contacts/ContactsManager.swift @@ -106,7 +106,7 @@ final class ContactsManager: ObservableObject { do { var contactCounter = 0 try store.enumerateContacts(with: request, usingBlock: { (contact, _) in - DispatchQueue.main.sync { + DispatchQueue.main.async { let newContact = Contact( identifier: contact.identifier, firstName: contact.givenName,