mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9348415cf5 | ||
|
|
ad8c04bf9f | ||
|
|
667f9bdde9 | ||
|
|
aedc9d65c8 | ||
|
|
2869c644ed | ||
|
|
200618dee7 | ||
|
|
5d14b16d73 | ||
|
|
b08e3a8ee1 | ||
|
|
3511f24a26 | ||
|
|
fa803f2258 | ||
|
|
d23f13f837 | ||
|
|
d4c876d009 | ||
|
|
d2ef40ccb7 | ||
|
|
8cf332f0ff | ||
|
|
be345ea829 | ||
|
|
c52bb832b4 | ||
|
|
1eebea9df5 | ||
|
|
150b236468 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,3 +1,19 @@
|
||||
<a name="3.3.0"></a>
|
||||
# [3.3.0](https://github.com/driftyco/ionic-native/compare/v3.2.4...v3.3.0) (2017-03-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **android-full-screen:** add cordova-plugin-fullscreen support (#1255) ([b08e3a8](https://github.com/driftyco/ionic-native/commit/b08e3a8))
|
||||
* **intel-security:** add com-intel-security-cordova-plugin support (#1256) ([aedc9d6](https://github.com/driftyco/ionic-native/commit/aedc9d6))
|
||||
|
||||
|
||||
|
||||
<a name="3.2.4"></a>
|
||||
## [3.2.4](https://github.com/driftyco/ionic-native/compare/v3.2.3...v3.2.4) (2017-03-26)
|
||||
|
||||
|
||||
|
||||
<a name="3.2.3"></a>
|
||||
## [3.2.3](https://github.com/driftyco/ionic-native/compare/v3.2.2...v3.2.3) (2017-03-24)
|
||||
|
||||
|
||||
13
gulpfile.js
13
gulpfile.js
@@ -5,7 +5,8 @@ const gulp = require('gulp'),
|
||||
rename = require("gulp-rename"),
|
||||
tslint = require('gulp-tslint'),
|
||||
decamelize = require('decamelize'),
|
||||
replace = require('gulp-replace');
|
||||
replace = require('gulp-replace'),
|
||||
_ = require('lodash');
|
||||
|
||||
const flagConfig = {
|
||||
string: ['port', 'version', 'ngVersion', 'animations'],
|
||||
@@ -31,16 +32,16 @@ gulp.task('lint', () => {
|
||||
gulp.task('plugin:create', () => {
|
||||
if (flags.n && flags.n !== ''){
|
||||
|
||||
const src = flags.m?'./scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl',
|
||||
const src = flags.m ? './scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl',
|
||||
pluginName = flags.n,
|
||||
pluginPackageName = decamelize(pluginName, '-'),
|
||||
pluginNameSpaced = pluginName.replace(/(?!^)([A-Z])/g, ' $1');
|
||||
|
||||
return gulp.src(src)
|
||||
.pipe(replace('PluginName', pluginName))
|
||||
.pipe(replace('Plugin Name', pluginNameSpaced))
|
||||
.pipe(replace('$PluginName', pluginName))
|
||||
.pipe(replace('$Plugin_Name', pluginNameSpaced))
|
||||
.pipe(replace('$pluginName', _.lowerFirst(pluginName)))
|
||||
.pipe(rename('index.ts'))
|
||||
.pipe(gulp.dest('./src/@ionic-native/plugins/' + pluginPackageName));
|
||||
.pipe(gulp.dest('./src/@ionic-native/plugins/' + _.kebabCase(pluginName)));
|
||||
|
||||
} else {
|
||||
console.log("Usage is: gulp plugin:create -n PluginName");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "3.2.3",
|
||||
"version": "3.3.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
@@ -43,7 +43,8 @@
|
||||
"clean": "rimraf dist .tmp",
|
||||
"shipit": "npm run build && gulp readmes && npm run npmpub",
|
||||
"npmpub": "node scripts/build/publish.js",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
||||
"postchangelog": "git commit -am \"chore(): update changelog\""
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
|
||||
@@ -13,6 +13,7 @@ const FLAGS = '--access public'; // add any flags here if you want... (example:
|
||||
|
||||
const PACKAGES = fs.readdirSync(DIST);
|
||||
|
||||
const failedPackages = [];
|
||||
|
||||
const QUEUE = queue({
|
||||
concurrency: 10
|
||||
@@ -26,7 +27,15 @@ PACKAGES.forEach(packageName => {
|
||||
const packagePath = path.resolve(DIST, packageName);
|
||||
exec(`npm publish ${packagePath} ${FLAGS}`)
|
||||
.then(() => done())
|
||||
.catch(done);
|
||||
.catch((e) => {
|
||||
if (e.stderr && e.stderr.indexOf('previously published version') === -1) {
|
||||
failedPackages.push({
|
||||
cmd: e.cmd,
|
||||
stderr: e.stderr
|
||||
});
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -36,9 +45,14 @@ QUEUE.start((err) => {
|
||||
|
||||
if (err) {
|
||||
console.log('Error publishing ionic-native. ', err);
|
||||
} else if (failedPackages.length > 0) {
|
||||
console.log(`${failedPackages.length} packages failed to publish.`);
|
||||
console.log(failedPackages);
|
||||
} else {
|
||||
console.log('Done publishing ionic-native!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
"rootDir": "../../src/",
|
||||
"target": "es5",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
"lib": ["es2015", "dom"],
|
||||
"sourceMap": true,
|
||||
"inlineSources": true
|
||||
},
|
||||
"files": [
|
||||
"../../src/@ionic-native/core/index.ts"
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
"rootDir": "../../../src/@ionic-native/plugins/",
|
||||
"target": "es5",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
"lib": ["es2015", "dom"],
|
||||
"sourceMap": true,
|
||||
"inlineSources": true
|
||||
},
|
||||
"files": []
|
||||
}
|
||||
|
||||
@@ -7,18 +7,23 @@ import { Injectable } from '@angular/core';
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { PluginName } from 'ionic-native';
|
||||
* import { $PluginName } from 'ionic-native';
|
||||
*
|
||||
*
|
||||
* constructor(private $pluginName: $PluginName) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'PluginName',
|
||||
pluginName: '$PluginName',
|
||||
plugin: '',
|
||||
pluginRef: '',
|
||||
repo: ''
|
||||
})
|
||||
@Injectable()
|
||||
export class PluginName {
|
||||
export class $PluginName {
|
||||
|
||||
}
|
||||
|
||||
@@ -15,29 +15,35 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name Plugin Name
|
||||
* @name $Plugin_Name
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { PluginName } from 'ionic-native';
|
||||
* import { $PluginName } from 'ionic-native';
|
||||
*
|
||||
* PluginName.functionName('Hello', 123)
|
||||
* .then((something: any) => doSomething(something))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* constructor(private $pluginName: $PluginName) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.$pluginName.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'PluginName',
|
||||
pluginName: '$PluginName',
|
||||
plugin: '', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: '', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: '', // the github repository URL for the plugin
|
||||
install: '' // OPTIONAL install command, in case the plugin requires variables
|
||||
})
|
||||
@Injectable()
|
||||
export class PluginName {
|
||||
export class $PluginName {
|
||||
|
||||
/**
|
||||
* This function does something
|
||||
|
||||
@@ -203,15 +203,19 @@ export function Plugin(config: PluginConfig) {
|
||||
cls['getPluginName'] = function() {
|
||||
return config.pluginName;
|
||||
};
|
||||
|
||||
cls['getPluginRef'] = function() {
|
||||
return config.pluginRef;
|
||||
};
|
||||
|
||||
cls['getPluginInstallName'] = function() {
|
||||
return config.plugin;
|
||||
};
|
||||
|
||||
cls['getPluginRepo'] = function() {
|
||||
return config.repo;
|
||||
};
|
||||
|
||||
cls['getSupportedPlatforms'] = function() {
|
||||
return config.platforms;
|
||||
};
|
||||
|
||||
95
src/@ionic-native/plugins/android-full-screen/index.ts
Normal file
95
src/@ionic-native/plugins/android-full-screen/index.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Android Full Screen
|
||||
* @description
|
||||
* This plugin enables developers to offer users a true full screen experience in their Cordova and PhoneGap apps for Android.
|
||||
* Using Android 4.0+, you can use true full screen in "lean mode", the way you see in apps like YouTube, expanding the app right to the edges of the screen, hiding the status and navigation bars until the user next interacts. This is ideally suited to video or cut-scene content.
|
||||
* In Android 4.4+, however, you can now enter true full screen, fully interactive immersive mode. In this mode, your app will remain in true full screen until you choose otherwise; users can swipe down from the top of the screen to temporarily display the system UI.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AndroidFullScreen } from '@ionic-native/android-full-screen';
|
||||
*
|
||||
* constructor(private androidFullScreen: AndroidFullScreen) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.androidFullScreen.isImmersiveModeSupported()
|
||||
* .then(() => this.androidFullScreen.immersiveMode())
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AndroidFullScreen',
|
||||
plugin: 'cordova-plugin-fullscreen',
|
||||
pluginRef: 'AndroidFullScreen',
|
||||
repo: 'https://github.com/mesmotronic/cordova-plugin-fullscreen',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidFullScreen {
|
||||
/**
|
||||
* Is this plugin supported?
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
isSupported(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Is immersive mode supported?
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
isImmersiveModeSupported(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* The width of the screen in immersive mode.
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
immersiveWidth(): Promise<number> { return; }
|
||||
|
||||
/**
|
||||
* The height of the screen in immersive mode.
|
||||
* @return {Promise<number>}
|
||||
*/
|
||||
@Cordova()
|
||||
immersiveHeight(): Promise<number> { return; }
|
||||
|
||||
/**
|
||||
* Hide system UI until user interacts.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
leanMode(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Show system UI.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
showSystemUI(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Extend your app underneath the status bar (Android 4.4+ only).
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
showUnderStatusBar(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Extend your app underneath the system UI (Android 4.4+ only).
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
showUnderSystemUI(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Hide system UI and keep it hidden (Android 4.4+ only).
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
immersiveMode(): Promise<void> { return; }
|
||||
}
|
||||
@@ -39,7 +39,7 @@ export interface FingerprintOptions {
|
||||
* clientSecret: "password", //Only necessary for Android
|
||||
* disableBackup:true //Only for Android(optional)
|
||||
* })
|
||||
* .then((result: any) => console.log(any))
|
||||
* .then((result: any) => console.log(result))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
|
||||
@@ -399,7 +399,7 @@ export class GoogleMap {
|
||||
* // create a new map by passing HTMLElement
|
||||
* let element: HTMLElement = document.getElementById('map');
|
||||
*
|
||||
* let map: GoogleMap = GoogleMaps.create(element);
|
||||
* let map: GoogleMap = this.googleMaps.create(element);
|
||||
*
|
||||
* // listen to MAP_READY event
|
||||
* // You must wait for this event to fire before adding something to the map or modifying it in anyway
|
||||
|
||||
250
src/@ionic-native/plugins/intel-security/index.ts
Normal file
250
src/@ionic-native/plugins/intel-security/index.ts
Normal file
@@ -0,0 +1,250 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
declare var window: any;
|
||||
|
||||
export interface IntelSecurityDataOptions {
|
||||
/** Non-empty string. **/
|
||||
data: String;
|
||||
/** Tag text. */
|
||||
tag?: String;
|
||||
/** Valid secure data instance ID. */
|
||||
extraKey?: Number;
|
||||
/** Application access control policy. */
|
||||
appAccessControl?: Number;
|
||||
/** Device locality policy. */
|
||||
deviceLocality?: Number;
|
||||
/** Sensitivity level policy. */
|
||||
sensitivityLevel?: Number;
|
||||
/** Disallow sealed blob access. */
|
||||
noStore?: Boolean;
|
||||
/** Disallow plain-text data access. */
|
||||
noRead?: Boolean;
|
||||
/** Creator unique ID. */
|
||||
creator?: Number;
|
||||
/** Array of owners unique IDs. */
|
||||
owners?: Number[];
|
||||
/** List of trusted web domains. */
|
||||
webOwners?: String[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Intel Security
|
||||
* @description
|
||||
* The App Security API enables the use of security properties and capabilities on the platform, using a new set of API defined for application developers. You are not required to be a security expert to make good use of the API. Key elements, such as encryption of data and establishments of capabilities, is abstracted and done by the API implementation, for you.
|
||||
*
|
||||
* For example:
|
||||
* - Use the API to store (E.g. cache) data locally, using the device non-volatile storage. Data protection/encryption will be done for you by the API implementation
|
||||
* - Establish a connection with remote server (E.g. XHR) using a protected channel. SSL/TLS establishment and usage will be done for you by the API implementation
|
||||
*
|
||||
* For more information please visit the [API documentation](https://software.intel.com/en-us/app-security-api/api).
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { IntelSecurity } from '@ionic-native/intel-security';
|
||||
* ...
|
||||
* constructor(private intelSecurity: IntelSecurity) { }
|
||||
* ...
|
||||
*
|
||||
* let storageID = 'id';
|
||||
*
|
||||
* this.intelSecurity.data.createFromData({ data: 'Sample Data' })
|
||||
* .then((instanceID: Number) => this.IntelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.read({id: storageID })
|
||||
* .then(this.intelSecurity.data.getData)
|
||||
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.delete({ id: storageID })
|
||||
* .then(() => console.log('Deleted Successfully'))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
* @classes
|
||||
* IntelSecurityData
|
||||
* IntelSecurityStorage
|
||||
* @interfaces
|
||||
* IntelSecurityDataOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'IntelSecurity',
|
||||
plugin: 'com-intel-security-cordova-plugin',
|
||||
pluginRef: 'intel.security',
|
||||
repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin'
|
||||
})
|
||||
@Injectable()
|
||||
export class IntelSecurity {
|
||||
|
||||
/**
|
||||
* returns an IntelSecurityStorage object
|
||||
* @type {IntelSecurityStorage}
|
||||
*/
|
||||
storage: IntelSecurityStorage = new IntelSecurityStorage();
|
||||
|
||||
/**
|
||||
* Returns an IntelSecurityData object
|
||||
* @type {IntelSecurityData}
|
||||
*/
|
||||
data: IntelSecurityData = new IntelSecurityData();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'IntelSecurity',
|
||||
plugin: 'com-intel-security-cordova-plugin',
|
||||
pluginRef: 'intel.security.secureData'
|
||||
})
|
||||
export class IntelSecurityData {
|
||||
|
||||
/**
|
||||
* This creates a new instance of secure data using plain-text data.
|
||||
* @param options {IntelSecurityDataOptions}
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
createFromData(options: IntelSecurityDataOptions): Promise<Number> { return; }
|
||||
|
||||
/**
|
||||
* This creates a new instance of secure data (using sealed data)
|
||||
* @param options {Object}
|
||||
* @param options.sealedData {string} Sealed data in string format.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
createFromSealedData(options: { sealedData: string }): Promise<Number> { return; }
|
||||
|
||||
/**
|
||||
* This returns the plain-text data of the secure data instance.
|
||||
* @param instanceID {Number} Secure data instance ID.
|
||||
* @returns {Promise<string>} Returns a Promise that resolves to the data as plain-text, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getData(instanceID: Number): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* This returns the sealed chunk of a secure data instance.
|
||||
* @param instanceID {any} Secure data instance ID.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves to the sealed data, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getSealedData(instanceID: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This returns the tag of the secure data instance.
|
||||
* @param instanceID {any} Secure data instance ID.
|
||||
* @returns {Promise<string>} Returns a Promise that resolves to the tag, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getTag(instanceID: any): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* This returns the data policy of the secure data instance.
|
||||
* @param instanceID {any} Secure data instance ID.
|
||||
* @returns {Promise<any>} Returns a promise that resolves to the policy object, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getPolicy(instanceID: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This returns an array of the data owners unique IDs.
|
||||
* @param instanceID {any} Secure data instance ID.
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getOwners(instanceID: any): Promise<Array<any>> { return; }
|
||||
|
||||
/**
|
||||
* This returns the data creator unique ID.
|
||||
* @param instanceID {any} Secure data instance ID.
|
||||
* @returns {Promise<Number>} Returns a promsie that resolves to the creator's unique ID, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getCreator(instanceID: any): Promise<Number> { return; }
|
||||
|
||||
/**
|
||||
* This returns an array of the trusted web domains of the secure data instance.
|
||||
* @param instanceID {any} Secure data instance ID.
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getWebOwners(instanceID: any): Promise<Array<any>> { return; }
|
||||
|
||||
/**
|
||||
* This changes the extra key of a secure data instance. To successfully replace the extra key, the calling application must have sufficient access to the plain-text data.
|
||||
* @param options {Object}
|
||||
* @param options.instanceID {any} Secure data instance ID.
|
||||
* @param options.extraKey {Number} Extra sealing secret for secure data instance.
|
||||
* @returns {Promise<any>} Returns a promise that resolves with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
changeExtraKey(options: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This releases a secure data instance.
|
||||
* @param instanceID {any} Secure data instance ID.
|
||||
* @returns {Promise<any>} Returns a promise that resovles with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
destroy(instanceID: any): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'IntelSecurity',
|
||||
plugin: 'com-intel-security-cordova-plugin',
|
||||
pluginRef: 'intel.security.secureStorage'
|
||||
})
|
||||
export class IntelSecurityStorage {
|
||||
|
||||
/**
|
||||
* This deletes a secure storage resource (indicated by id).
|
||||
* @param options {Object}
|
||||
* @param options.id {String} Storage resource identifier.
|
||||
* @param [options.storageType] {Number} Storage type.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
delete(options: {
|
||||
id: string,
|
||||
storageType?: Number
|
||||
}): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This reads the data from secure storage (indicated by id) and creates a new secure data instance.
|
||||
* @param options {Object}
|
||||
* @param options.id {String} Storage resource identifier.
|
||||
* @param [options.storageType] {Number} Storage type.
|
||||
* @param [options.extraKey] {Number} Valid secure data instance ID.
|
||||
* @returns {Promise<Number>} Returns a Promise that resolves with the instance ID of the created secure data instance, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
read(options: {
|
||||
id: string,
|
||||
storageType?: Number,
|
||||
extraKey?: Number
|
||||
}): Promise<Number> { return; }
|
||||
|
||||
/**
|
||||
* This writes the data contained in a secure data instance into secure storage.
|
||||
* @param options {Object}
|
||||
* @param options.id {String} Storage resource identifier.
|
||||
* @param options.instanceID {Number} Valid secure data instance ID
|
||||
* @param [options.storageType] {Number} Storage type.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
write(options: {
|
||||
id: String,
|
||||
instanceID: Number,
|
||||
storageType?: Number
|
||||
}): Promise<any> { return; }
|
||||
|
||||
}
|
||||
@@ -56,7 +56,7 @@ export interface MusicControlsOptions {
|
||||
* ticker : 'Now playing "Time is Running Out"'
|
||||
* });
|
||||
*
|
||||
* this.musicControls.subscribe().subscribe(action => {
|
||||
* this.musicControls.subscribe(action => {
|
||||
*
|
||||
* switch(action) {
|
||||
* case 'music-controls-next':
|
||||
|
||||
@@ -92,7 +92,7 @@ export class SecureStorageObject {
|
||||
plugin: 'cordova-plugin-secure-storage',
|
||||
pluginRef: 'cordova.plugins.SecureStorage',
|
||||
repo: 'https://github.com/Crypho/cordova-plugin-secure-storage',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone', 'Browser']
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class SecureStorage {
|
||||
|
||||
Reference in New Issue
Block a user