Taptic Engine
An Ionic plugin to use Taptic Engine API on iPhone 7, 7 Plus or newer.
Repo: https://github.com/EddyVerbruggen/cordova-plugin-taptic-engine
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-taptic-engine $ npm install --save @ionic-native/taptic-engine
- Add this plugin to your app's module
Supported platforms
- iOS
Usage
import { TapticEngine } from '@ionic-native/taptic-engine';
...
constructor(private taptic: TapticEngine) { }
...
this.taptic.selection();
this.taptic.notification();
this.taptic.impact();
Instance Members
selection()
Use selection feedback generators to indicate a change in selection.
Returns: Promise<any>
Returns a promise that resolves on success and rejects on error
notification(options, options.type)
Use this to indicate success/failure/warning to the user.
Param | Type | Details |
---|---|---|
options |
Object
|
should be of the type { type: 'success' } (or 'warning'/'error') |
options.type |
string
|
Returns: Promise<any>
Returns a promise that resolves on success and rejects on error
impact(options, options.type)
Use this to indicate success/failure/warning to the user.
Param | Type | Details |
---|---|---|
options |
Object
|
should be of the type { style: 'light' } (or 'medium'/'heavy') |
options.type |
string
|
Returns: Promise<any>
Returns a promise that resolves on success and rejects on error