Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vibrate iPhone 6S manually like peek and pop?

How can I manually trigger a single click-like vibration like the ones that happen when using peek&pop, or application shortcuts?

like image 665
vrwim Avatar asked Oct 29 '15 22:10

vrwim


People also ask

How do I put my iPhone on vibrate without a switch?

On iPhone 7 and later, go to Settings > Sounds & Haptics. On earlier iPhone models, go to Settings > Sounds. You can choose if you want your iPhone to vibrate when it's set to Ring or Silent mode. If you turn off both settings, your iPhone won't vibrate.

Can you change vibration intensity iPhone 11?

No, you can't make your iPhone vibrate louder.


2 Answers

This method is easy to implement and it works really well (I tried it myself)

import AudioToolbox

AudioServicesPlaySystemSound(1519) // Peek feedback
AudioServicesPlaySystemSound(1520) // Pop feedback
AudioServicesPlaySystemSound(1521) // Three pulses feedback

I hope this helps! :)

like image 65
Matt Panzer Avatar answered Oct 02 '22 21:10

Matt Panzer


It seems that these guys have found a way to do it for iOS 9 for phones with Taptic Engine (including the iPhone 6S). http://unifiedsense.com/development/using-taptic-engine-on-ios.html I'm not sure if it applies to iOS 8 or any other phones. They've essentially retrieved the Taptic Engine interface from UIDevice and called actuateFeedback with an integer corresponding to Peek or Pop.

Unfortunately these apps would likely be rejected by the App Store, if that's your intention.

like image 38
meepzh Avatar answered Oct 02 '22 23:10

meepzh