You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2019/12/15 16:24:37 UTC

[cordova-plugin-dialogs] branch master updated: CB-5417(ios): use background thread for beep (#133)

This is an automated email from the ASF dual-hosted git repository.

jcesarmobile pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-dialogs.git


The following commit(s) were added to refs/heads/master by this push:
     new b9a57d2  CB-5417(ios): use background thread for beep (#133)
b9a57d2 is described below

commit b9a57d2553ae2db2e68ab5e15d7f34d5f1907ac8
Author: jcesarmobile <jc...@gmail.com>
AuthorDate: Sun Dec 15 17:24:30 2019 +0100

    CB-5417(ios): use background thread for beep (#133)
---
 src/ios/CDVNotification.m | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ios/CDVNotification.m b/src/ios/CDVNotification.m
index 89f3d5d..9c775a7 100644
--- a/src/ios/CDVNotification.m
+++ b/src/ios/CDVNotification.m
@@ -222,8 +222,10 @@ static void soundCompletionCallback(SystemSoundID  ssid, void* data) {
 
 - (void)beep:(CDVInvokedUrlCommand*)command
 {
-    NSNumber* count = [command argumentAtIndex:0 withDefault:[NSNumber numberWithInt:1]];
-    playBeep([count intValue]);
+    [self.commandDelegate runInBackground:^{
+        NSNumber* count = [command argumentAtIndex:0 withDefault:[NSNumber numberWithInt:1]];
+        playBeep([count intValue]);
+    }];
 }
 
 -(UIViewController *)getTopPresentedViewController {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org