I have stuck in a problem that in my alarm application for that i m creating a local notification and in my app there is a vibration on/off button when user on the vibration at that time only iPhone should vibrate sound will not come and when user off the vibration at that time only iPhone sound should come not vibrate. Please help me to solve this problem.
Try this code.
if(isVibrationButtonOn)
{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
Dont forget to import
AudioToolbox/AudioToolbox.h
Edit: In case of Local notification and vibration, You can refer the following discussions.
SO POST 1
SO POST 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With