Vibrate iPhone 6S manually like peek and pop?

后端 未结 2 1026
野性不改
野性不改 2021-02-09 23:06

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

2条回答
  •  再見小時候
    2021-02-09 23:22

    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.

提交回复
热议问题