I am currently working on an iPhone application that should make the phone vibrate if a special event occurs.
Checks to trigger an alert are performed on the thread.
Unfortunately, the phone will not vibrate if I call
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
from inside the stream. (It works fine if I call this in my viewDidAppear method).
I even tried making a callback inside thead like this:
inside Thread:
[self performSelectorOnMainThread:@selector(doAlarm)
withObject:nil
waitUntilDone:true];
-(void)doAlarm {
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
which has the same result: no vibration on the phone.
How to make the phone vibrate from the stream?
Thanks in advance
source
share