Skip to content

rdn87/cordova-plugin-sirikit-available

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-sirikit-available

SiriKit Permission Cordova Plugin for iOS

Author: Giulio Caruso aka rdn

Language License

Adding the Plugin

Use the Cordova CLI and type in the following command:

cordova plugin add https://github.com/rdn87/cordova-plugin-sirikit-available --variable SIRI_DESC=SiriKit Use

Description

With this plug-in you can execute the native method requestSiriAuthorization for use SiriKit.

Sample Code

The Plugin is only iOS Platform required iOS 10.0+.

Execute requestPermission method in your Javascript

cordova.plugins.SiriKitPermission.requestPermission(function(response) {
    // success function
}, function() {
    // failed function
});

response is flag (true/false) and identifies the state 
true = INSiriAuthorizationStatusAuthorized
false = INSiriAuthorizationStatusDenied, INSiriAuthorizationStatusNotDetermined, INSiriAuthorizationStatusRestricted

License

cordova-plugin-sirikit-available is available under the MIT license. See the LICENSE file for more info.