浏览代码

Play UILocalNotificationDefaultSoundName if sound is given as an empty string.

Sebastián Katzer 12 年之前
父节点
当前提交
f906c0d1ff
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/ios/APPLocalNotification.m

+ 2 - 2
src/ios/APPLocalNotification.m

@@ -123,8 +123,8 @@
         notification.alertBody              = title ? [NSString stringWithFormat:@"%@\n%@", title, msg] : msg;
     }
 
-    if ( ! [sound isEqualToString:@""]) {
-        notification.soundName              = sound;
+    if (sound != (NSString *) [NSNull null]) {
+        notification.soundName              = [sound isEqualToString:@""] ? UILocalNotificationDefaultSoundName : sound;
     }
 
     notification.hasAction                  = hasAction;