react-native/Libraries/PushNotificationIOS
Alex Ledak 9fae268e5b Play sound in local notification only if soundName is specified
Summary:
Currently it's not possible to create a silent local notification (which is useful for badge updates) with PushNotificationIOS. This commit solves the problem - when **soundName** param is not specified in **PushNotificationIOS.scheduleLocalNotification** method, a silent notification will be created.

Local notification without sound:
```
let fireDate = new Date();
fireDate = fireDate.setSeconds(fireDate.getSeconds() + 15); //fire in 15 seconds
PushNotificationIOS.scheduleLocalNotification({
  fireDate: fireDate,
  alertBody: "I'm silent!"
});
```

Local notification with sound:
```
let fireDate = new Date();
fireDate = fireDate.setSeconds(fireDate.getSeconds() + 15); //fire in 15 seconds
PushNotificationIOS.scheduleLocalNotification({
  fireDate: fireDate,
  alertBody: "I'm with sound!",
  soundName: "Any sound"
});
```
Closes https://github.com/facebook/react-native/pull/13734

Differential Revision: D5144848

Pulled By: shergin

fbshipit-source-id: dc990b2673305a01cfd868fcdedcf27c461d0a34
2017-05-28 15:37:10 -07:00
..
RCTPushNotification.xcodeproj Enable -Wimplicit-retain-self en sync warning config for all projects 2017-03-23 15:01:34 -07:00
PushNotificationIOS.js Play sound in local notification only if soundName is specified 2017-05-28 15:37:10 -07:00
RCTPushNotificationManager.h Handle push notifications on iOS 2017-02-03 11:58:30 -08:00
RCTPushNotificationManager.m Play sound in local notification only if soundName is specified 2017-05-28 15:37:10 -07:00