4

I'm kind of stuck with this issue. I have a working Push Notification in my app, and i'm trying to let the user to choose his own sound (All sounds are from iPhone built in sounds - kind of 'whatsapp') for a specific push notification. the Payload i'm getting is something like

aps: {
alert = Message Type 1;
badge = 1;
sound = "default";
}

now in my app the user has three types of Push Notification, and I let the user choose which ringtone/Sound he wants for a certain push, after he choose I've saved his choice in NSUserDefaults.

my problem is that I Don't know how override the default sound in my userInfo and make a new Notification with a different sound that I saved in the NSUserDefaults. I did it easily on Java, but it's so different with Swift and the way it's work with IOS. Would be grateful, If anyone can shade some light on the subject.

XcodeNOOB
  • 2,135
  • 4
  • 23
  • 29

0 Answers0