Parcourir la source

Play UILocalNotificationDefaultSoundName if sound is given as an empty string.

Sebastián Katzer il y a 12 ans
Parent
commit
f906c0d1ff
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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;