0

I am developing a chat app. And of course, local notification is of great importance in such applications. So, I decided to take a look at the other chat apps to get an idea. Surprisingly, I found that WhatsApp and telegram have so much common alert tones. So the question is: Are the tones in whatsapp and telegram are system sounds? And if so, how to use them?

I did some search but found nothing regarding the topic!

halfer
  • 19,824
  • 17
  • 99
  • 186
joker
  • 3,416
  • 2
  • 34
  • 37
  • 1
    We don't do research here on SO. But if you asked how can you use different sounds for notification would be a better question. – Black Frog Dec 29 '14 at 16:25
  • Yeah I did search here before posting the question. If you want to suggest some keywords, that might help too. – joker Dec 29 '14 at 16:30

1 Answers1

0

When you send a remote notification to a device you can specify a notification sound.

As per the Apple docs the sound key should contain a string with:

The name of a sound file in the app bundle. The sound in this file is played as an alert. If the sound file doesn’t exist or default is specified as the value, the default alert sound is played. The audio must be in one of the audio data formats that are compatible with system sounds; see Preparing Custom Alert Sounds for details.

In case of a local notification you can set the property soundName to UILocalNotificationDefaultSoundName or any name of a sound file in the app bundle as well.

The notification sounds are located inside the app bundle. You *could* just unzip and explore the .ipa of the apps you mentioned.

fpg1503
  • 7,492
  • 6
  • 29
  • 49
  • Pardon my question, but how can I get an .ipa file of an app? – joker Dec 29 '14 at 16:48
  • Download the app using iTunes, go to `My Apps`, Right-click the app, select `Show in Finder`, rename the file from `.ipa` to `.zip`, extract it, go to `Payload`, Right-click the app, select `Show Package Contents` -> Voilà; You probably want to see the `.caf` files :) – fpg1503 Dec 29 '14 at 17:04