UILocalNotifications plays sound in the simulator, but not on the device

I'm just trying to include UILocalNotificationin my new application. Everything works well, but the sound does not do what I want.

I turned on a ringtone called "Electro.caf", which reproduces sound seamlessly on my MacBook. Even if I try it in iPhone Simulator as a local notification. But if I want to try it on my iPhone 4 (iOS 4.3.2), it does not work. It is not disabled, the maximum volume, and I tried to uninstall the application, reinstall it, etc.

Is there anyone who understands the same problem or knows a solution?

Thanks mavrick3.

+3
source share
3 answers

iOS Simulator , . , Electro.caf Electro.caf

+1

:

; ".app". . Mac, . iPhone , Mac. ~/Library ~/Documents .

, 30 ,

0

You are using the wrong .caf file format.

To create a .caf file, use iTunes.

iTunes → settings → Import settings → import using: select the AIFF encoder, create user settings, if you want click “OK”, again “OK”

then select the music from your library and press: advanced → create an AIFF version drag and drop the new generated file to the desktop and change the extension from .aif to .caf

that you have a .caf file that will work on your iPhone

0
source

All Articles