From fad136c72b7e7685cf8c3bea55b1b143b060f69c Mon Sep 17 00:00:00 2001 From: bassam elbdrawy <46647043+bassamelbdrawy@users.noreply.github.com> Date: Wed, 25 May 2022 10:29:10 +0200 Subject: [PATCH] Update SendSMS.m --- SendSMS/SendSMS.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SendSMS/SendSMS.m b/SendSMS/SendSMS.m index 1727ac5..fbcbaab 100644 --- a/SendSMS/SendSMS.m +++ b/SendSMS/SendSMS.m @@ -56,7 +56,7 @@ - (dispatch_queue_t)methodQueue messageController.messageComposeDelegate = self; - UIViewController *currentViewController = [UIApplication sharedApplication].keyWindow.rootViewController; + UIViewController *currentViewController = [UIApplication sharedApplication].delegate.window.rootViewController; while(currentViewController.presentedViewController) { currentViewController = currentViewController.presentedViewController; }