0

In my application, I need to vibrate the user's phone at quite a fast rate, sometimes less than half a second interval between vibrations. I'm able to do so with haptic feedback, but a lot of people still haven't upgraded to iPhone 6s-7,

So I'm going to use

AudioServicesPlayAlertSound(kSystemSoundID _Vibrate)

The problem with this is that most of the time, the vibration only plays every twice interval, rather than every single time the function is fired. However, sometimes it plays correctly twice in a row, and then goes back to every other time. Is there any way to fix this?

Sahil Manchanda
  • 9,812
  • 4
  • 39
  • 89
themaanas
  • 41
  • 3
  • how should we help you if you didn't provide what you tried. Please read [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – zombie Aug 03 '17 at 19:55
  • Sorry about that, but I believed I figured it out. I was just looking for a way to fire vibrations fast, but instead I'm going to use a different vibration that's shorter. – themaanas Aug 03 '17 at 20:02
  • @themaanas what you used to resolve the issue? can you share some code glimpse of it? if it is possible – Premal Khetani Aug 04 '17 at 04:51
  • 1
    @Ryuk Of course! The main problem was that the standard vibration was just too long. If you use AudioServicesPlaySystemSound(1520), this will give the Pop of the Peek and Pop vibrations. Short, but a hard pulse. It's not as noticeable, but it'll do for my purposes. I'd pay close attention to this [link](https://stackoverflow.com/questions/33425586/vibrate-iphone-6s-manually-like-peek-and-pop). I've heard multiple accounts of people saying that Apple will reject any app using this vibration, but others saying their apps got approved. Guess it just depends on the reviewer ¯\_(ツ)_/¯. – themaanas Aug 05 '17 at 01:46
  • Thanks man hope your app will approve :) (Y) – Premal Khetani Aug 05 '17 at 17:55

0 Answers0