From df1e27882bdf4e2f7175906b01d3f7b67cb4b69f Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 20 Apr 2021 15:52:13 +0300 Subject: [PATCH] Fix asserted thread --- Config/CommonConfiguration.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Config/CommonConfiguration.swift b/Config/CommonConfiguration.swift index 57fdb56a9..75202356d 100644 --- a/Config/CommonConfiguration.swift +++ b/Config/CommonConfiguration.swift @@ -63,8 +63,10 @@ class CommonConfiguration: NSObject, Configurable { // Disable identicon use sdkOptions.disableIdenticonUseForUserAvatar = true - // Use UIKit BackgroundTask for handling background tasks in the SDK - sdkOptions.backgroundModeHandler = MXUIKitBackgroundModeHandler() + DispatchQueue.main.async { + // Use UIKit BackgroundTask for handling background tasks in the SDK + sdkOptions.backgroundModeHandler = MXUIKitBackgroundModeHandler() + } // Pass httpAdditionalHeaders to the SDK sdkOptions.httpAdditionalHeaders = BuildSettings.httpAdditionalHeaders