1

I just came across cycloramic app, which rotates the iPhone automatically to take 360 panoramas (you place the phone upright on a flat surface and it does its magic). I am blown away.

And my question is, how is it possible to control the vibration motor in iOS programmatically? I know you can vibrate it with AudioServices. Is it just straightforward vibration, but interrupted so it has shorter duration? Or is there something in the SDK I'm missing?

And if the app is using internals, how did it make it to App Store?

Any comments welcome

Ege Akpinar
  • 3,266
  • 1
  • 23
  • 29
  • Simple vibration rotates the phone, I guess. – duci9y Feb 12 '14 at 15:56
  • I tried the default vibration and it doesn't rotate the phone at all. I reckon the vibration is heavier on one side to achieve rotation. – Ege Akpinar Feb 12 '14 at 16:01
  • The only app that I've seen that does that states that it only works on iPhone 5. (I didn't check for 5S compatibility yet) – David Skrundz Feb 12 '14 at 16:03
  • He mentions something about the frequency of the vibration in the shark tank video. I doubt that he's just turning on the vibration motor. – 67cherries Feb 12 '14 at 16:05

1 Answers1

0

I've been struggling with this last week too. I downloaded Cycloramic and can't imagine how they achieve that effect. In fact, the phone starts with a short vibration and then it continues with a lengthy vibration that makes the phone rotate completely.

The default vibration in the iOS API is:

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)

and lasts 4 milliseconds with one millisecond of silence. You can try to chain the same function call several times but there will be always an interruption between two calls. I think there is no way to make a lengthy vibration that lasts more than 4 milliseconds :(

VíctorVarLed
  • 148
  • 1
  • 8