Legoless / TapticPlayground

A simple Taptic Playground for iPhone 6s Taptic Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Taptic Engine Playground

This example was used to discover the Apple's usage of Taptic Engine functions. It's actuation methods are hidden in UIDevice and _UITapticEngine classes and are called by UIPreviewInteractionController when appropriate.

This original sample displays a UITableViewController that triggers view controller previews, using preferredContentSize to show previews of different sizes. The sample also includes single-item and grouped action items.

Disclaimer

When you are using Apple Private API's you are taking all responsibility for any damage done to your device. That includes running and testing all code, contained in this repository.

Research

The methods and classes for Taptic Engine can be found using Runtime Headers, look for UIDevice and _UITapticEngine classes.

The values for peek and pop were discovered using Aspects and this is an example output:

// Cell touch
2015-09-28 01:32:25.322 ViewControllerPreview[656:143905] prepareUsingFeedback: (
    0
)
2015-09-28 01:32:25.325 ViewControllerPreview[656:143905] prepareUsingFeedback: (
    1
)
// Peek
2015-09-28 01:32:26.443 ViewControllerPreview[656:143905] actuateFeedback: (
    1001
)
2015-09-28 01:32:27.519 ViewControllerPreview[656:143905] endUsingFeedback: (
    0
)
2015-09-28 01:32:27.520 ViewControllerPreview[656:143905] endUsingFeedback: (
    1
)
// Pop
2015-09-28 01:32:27.538 ViewControllerPreview[656:143905] actuateFeedback: (
    1002
)

Requirements

Build

iOS 9 SDK, Xcode 7

Runtime

iOS 9

Thanks

A big thanks goes to Peter Steinberger for all his work on Aspects.

Contact

Dal Rupnik

License

TapticPlayground is released under the MIT license. See LICENSE file for more information.

About

A simple Taptic Playground for iPhone 6s Taptic Engine

License:MIT License


Languages

Language:Objective-C 74.6%Language:Swift 17.3%Language:Shell 8.0%Language:Ruby 0.1%