You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys I have a problem setting the sound in the iOSNotification (local!). I have use the default Android sound in emulator and real Android device using Notification.setSound("default") and it works well.
On iOS simulator (I don't have real device) I receive an error if I set the Notification sound.
When the push notification arrives I execute this code with the purpose to display the notification (app is foreground):
`
const FCN = firebase.notifications();
var n = new firebase.notifications.Notification();
n.setBody("Hi, my name is Paul");
n.setData({isLocal:true});
n.setTitle("Dear Jack")
n.setSound("default"); // <-- NOT WORKING WITH THIS LINE
FCN.displayNotification(n).then((result) => {
LOG.debug("PushNotificationsHelper :: notification displayed");
}, (error) => {
LOG.error("PushNotificationsHelper :: error showing notification")
});`
The error is a bit strange and it's shown when FCN.displayNotification fails:
Is the notification shown if you remove setSound? Yes
Does setSound works with Android? Yes
Have you tried on a real device? No, I don't have one
Should work even on simulator? I think that simulator has no problems with sounds
Podfile:
`
platform :ios, '9.0'
target 'asilo' do
pod 'RSKImageCropper'
pod 'QBImagePickerController'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'
end`
iOS 11 Simulator
React Native version: 0.52.2
RNFirebase Version: 4.0.1
Hi guys I have a problem setting the sound in the iOSNotification (local!). I have use the default Android sound in emulator and real Android device using Notification.setSound("default") and it works well.
On iOS simulator (I don't have real device) I receive an error if I set the Notification sound.
When the push notification arrives I execute this code with the purpose to display the notification (app is foreground):
`
The error is a bit strange and it's shown when FCN.displayNotification fails:
Podfile:
`
AppDelegate.m:
`
`
AppDelegate.h:
`
If you need something else let me know..!
Thank you for helping us :)
The text was updated successfully, but these errors were encountered: