user2037296
user2037296

Reputation: 421

Add a custom sound to UILocalNotification soundName

What am trying to do is, allow user to record an audio then use this recorded audio as an alarm sound, I have managed to do the recording part, but I can't set the recorded audio to UILocalNotification sound. I have google it for a while, all I found people saying it's not possible to use a custom sound unless it's in the main bundle. But there is this app called AidaReminder that managed to do what I want, so does anybody know how to do that?

Upvotes: 1

Views: 351

Answers (1)

jcaron
jcaron

Reputation: 17710

According to https://developer.apple.com/library/prerelease/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW6 :

The sound files can be in the main bundle of the client app or in the Library/Sounds folder of the app’s data container.

(emphasis and formatting added)

It's actually the first time I notice this, not sure this has always been the case or if that was added in a recent iOS version.

Upvotes: 1

Related Questions