From a31ee38bb5a5dfff64c55461b0b607e7a7fb03a3 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 1 Mar 2022 17:01:44 +0100 Subject: [PATCH] fix: crash after connecting to a device --- ios/ConnectSDKModule.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/ConnectSDKModule.m b/ios/ConnectSDKModule.m index fcdd178..d9fa2d9 100644 --- a/ios/ConnectSDKModule.m +++ b/ios/ConnectSDKModule.m @@ -372,7 +372,9 @@ - (void) connectDevice:(NSArray*)command ConnectableDevice* device = [deviceState device]; device.delegate = self; - [device connect]; + dispatch_async(dispatch_get_main_queue(), ^{ + [device connect]; + }); } }