From c0e00dab4cf4a9896c050003592fbf49d869942e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 28 Sep 2017 14:12:03 +0200 Subject: [PATCH] use the main thread, luke --- ios/app/watchos/extension/ExtensionDelegate.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ios/app/watchos/extension/ExtensionDelegate.swift b/ios/app/watchos/extension/ExtensionDelegate.swift index 100661c47..ab946c743 100644 --- a/ios/app/watchos/extension/ExtensionDelegate.swift +++ b/ios/app/watchos/extension/ExtensionDelegate.swift @@ -93,12 +93,16 @@ class ExtensionDelegate: NSObject, WCSessionDelegate, WKExtensionDelegate { if conferenceURL != "NULL" { let room = conferenceURL.components(separatedBy: "/").last let context = ["room" : room, "roomUrl" : conferenceURL as String!, "skipJoin" : "yes"] - currentController.pushController(withName: "InCallController", context: context) + DispatchQueue.main.async { + currentController.pushController(withName: "InCallController", context: context) + } } } else { // This must be InCallController if conferenceURL == "NULL" { - WKExtension.shared().visibleInterfaceController?.popToRootController() + DispatchQueue.main.async { + WKExtension.shared().visibleInterfaceController?.popToRootController() + } } } }