Skip to content

Commit

Permalink
execute presentation on main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbbb committed Dec 15, 2020
1 parent 3095427 commit b59167d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ios/EXSMS/EXSMSModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,14 @@ - (void)setModuleRegistry:(UMModuleRegistry *)moduleRegistry
}
messageComposeViewController.body = message;
messageComposeViewController.message = iMessage;
[self.utils.currentViewController presentViewController:messageComposeViewController animated:YES completion:nil];

UM_WEAKIFY(self);
[UMUtilities performSynchronouslyOnMainThread:^{
UM_ENSURE_STRONGIFY(self);
[self.utils.currentViewController presentViewController:messageComposeViewController animated:YES completion:nil];
}];
}

- (void)messageComposeViewController:(MFMessageComposeViewController *)controller
didFinishWithResult:(MessageComposeResult)result
{
Expand Down

0 comments on commit b59167d

Please sign in to comment.