Compare commits

..

33 Commits

Author SHA1 Message Date
Daniel
aad814fcf1 chore(): update changelog 2018-08-31 19:09:35 +02:00
Daniel
03d6b2373c 4.12.2 2018-08-31 19:09:24 +02:00
Daniel Kasper
d82e675442 fix(in-app-browser): fix mandatory options (#2684)
fix(in-app-browser): fix mandatory options
2018-08-31 19:05:33 +02:00
Daniel
1e84e23fd9 chore(): update changelog 2018-08-31 14:26:00 +02:00
Daniel
f3f12cb306 4.12.1 2018-08-31 14:25:53 +02:00
Daniel
b3bd0a83c7 chore(package): bump deps 2018-08-31 14:24:28 +02:00
rvdleun
03e4f0e439 feat(push): Added voip property to IOSPushOptions (#2681)
* feat(push): Added missing voip property to IOSPushOptions

* Update index.ts
2018-08-31 14:23:40 +02:00
Pandiarajan Nagarajan
a73146648f feat(aes256): Added new utility methods to generate secure key and secure IV (#2675) 2018-08-31 14:21:30 +02:00
Daniel Kasper
d90724ef70 feat(in-app-browser): Add missing InAppBrowserOptions-properties (#2669) 2018-08-31 14:21:19 +02:00
Brad Mallow
be0dc3dac4 fix(open-native-settings): allow supported input (#2666)
* allow supported input

* Update index.ts
2018-08-31 14:21:07 +02:00
Daniel
a0a64da518 chore(package): bump deps 2018-08-25 12:02:03 +02:00
somq
591ee87e05 feat(bluetooth-le): add bluetooth-le plugin (#2651)
* feat(bluetooth-le): implemented all available methods and refactored existing ones

* fix(bluetooth-le): Removed @memberof jsdoc annotations to avoid ci check failure

* fix(bluetooth-le): Fixed multiple jsdocs typos/misformats preventing CI to pass checks while generating readmes

* fix(bluetooth-le): Removed package-lock.json

* Update index.ts
2018-08-25 12:01:05 +02:00
Daniel
8db1dbef71 feat(http): add setSSLCertMode function 2018-08-21 20:39:21 +02:00
Daniel
73ae92d77c chore(): update changelog 2018-08-17 00:33:54 +02:00
Daniel
3c2753df64 4.12.0 2018-08-17 00:33:47 +02:00
Daniel
9035476833 chore(package): bump package-lock 2018-08-17 00:33:34 +02:00
Daniel
5f5e605e66 Merge remote-tracking branch 'origin/master' 2018-08-16 22:23:09 +02:00
Daniel
ea6746d134 chore(build): refactor 2018-08-16 22:23:03 +02:00
Daniel Sogl
753fa4a7a4 Update CHANGELOG.md 2018-08-16 22:19:18 +02:00
Daniel
ff784a4377 Auto stash before revert of "4.12.0" 2018-08-16 22:18:20 +02:00
Daniel
0764e28408 Revert "4.12.0"
This reverts commit 5825932e03.
2018-08-16 22:18:04 +02:00
Daniel
0197c88a03 chore(): update changelog 2018-08-16 22:10:36 +02:00
Daniel
5825932e03 4.12.0 2018-08-16 22:10:23 +02:00
Daniel
bccc8ac379 chore(package): update package-lock 2018-08-16 22:10:15 +02:00
Daniel
3eb382d438 chore(package): bump deps 2018-08-16 22:06:19 +02:00
Ashwin Dinesh
ca9a702808 feat(webengage): add optional config with initialization (#2637)
* feat(webengage): add optional config with initialization

* Update index.ts
2018-08-16 22:01:54 +02:00
Daniel Sogl
3f415f9bef fix(photo-library): interface missing includeVideos
Co-authored-by: @devdaddy 

closes: #2624
2018-08-16 21:58:30 +02:00
Luis Enrique Perez Alvarez
0c6d1eabe2 docs(onesignal): fix typo
OneSignla -> OneSignal
2018-08-16 21:56:11 +02:00
Niklas Merz
61fecf511b docs(firebase-dynamic-links): Change example (#2646)
* docs(firebase-dynamic-links): Change example

* Update index.ts
2018-08-16 21:55:59 +02:00
Daniel Ehrhardt
2ac52822b8 fix(extended-device-information): Fixed Memory Display Bug (#2641)
* Fixed Memory Display Bug with ExtendedDeviceInformation Plugin

* Update index.ts

* Update index.ts
2018-08-16 21:55:51 +02:00
rupendraa
229b62c10b feat(local-notifications): add new foreground property (#2633)
* Update index.ts

* Update index.ts
2018-08-16 21:55:17 +02:00
Gordeev Artem
9b4fd02fa5 feat(fabric): add fabric plugin (#2618)
* feat(fabric): add fabric plugin

* Update index.ts
2018-08-16 21:54:39 +02:00
Marat Dyatko
d10777a33b fix(network): bind listener to document instead of window (#2622)
We noticed that in some cases network state listeners are stopped triggering, but `navigator.onLine` still reflects the state correctly. I used the following code to debug and found out an issue with `window` and `document` difference:

```js
window.addEventListener("online", ()=>console.warn('WINDOW ONLINE'), false); // won't be triggered
window.addEventListener("online", ()=>console.warn('WINDOW ONLINE'), false); // won't be triggered
document.addEventListener("online", ()=>console.warn('DOCUMENT ONLINE'), false); // triggered
document.addEventListener("online", ()=>console.warn('DOCUMENT ONLINE'), false); // triggered
```

Also, according to plugin documentation, listeners should be bound to `document`: https://github.com/apache/cordova-plugin-network-information#offline
2018-08-01 04:41:51 -04:00
24 changed files with 1938 additions and 344 deletions

View File

@@ -1,3 +1,60 @@
<a name="4.12.2"></a>
## [4.12.2](https://github.com/ionic-team/ionic-native/compare/v4.12.1...v4.12.2) (2018-08-31)
### Bug Fixes
* **in-app-browser:** fix mandatory options ([#2684](https://github.com/ionic-team/ionic-native/issues/2684)) ([d82e675](https://github.com/ionic-team/ionic-native/commit/d82e675))
<a name="4.12.1"></a>
## [4.12.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.15...v4.12.1) (2018-08-31)
### Bug Fixes
* **open-native-settings:** allow supported input ([#2666](https://github.com/ionic-team/ionic-native/issues/2666)) ([be0dc3d](https://github.com/ionic-team/ionic-native/commit/be0dc3d))
### Features
* **aes256:** Added new utility methods to generate secure key and secure IV ([#2675](https://github.com/ionic-team/ionic-native/issues/2675)) ([a731466](https://github.com/ionic-team/ionic-native/commit/a731466))
* **in-app-browser:** Add missing InAppBrowserOptions-properties ([#2669](https://github.com/ionic-team/ionic-native/issues/2669)) ([d90724e](https://github.com/ionic-team/ionic-native/commit/d90724e))
* **push:** Added voip property to IOSPushOptions ([#2681](https://github.com/ionic-team/ionic-native/issues/2681)) ([03e4f0e](https://github.com/ionic-team/ionic-native/commit/03e4f0e))
<a name="5.0.0-beta.15"></a>
# [5.0.0-beta.15](https://github.com/ionic-team/ionic-native/compare/v4.12.0...v5.0.0-beta.15) (2018-08-25)
### Features
* **bluetooth-le:** add bluetooth-le plugin ([#2651](https://github.com/ionic-team/ionic-native/issues/2651)) ([591ee87](https://github.com/ionic-team/ionic-native/commit/591ee87))
* **http:** add setSSLCertMode function ([8db1dbe](https://github.com/ionic-team/ionic-native/commit/8db1dbe))
<a name="4.12.0"></a>
# [4.12.0](https://github.com/ionic-team/ionic-native/compare/v4.11.0...v4.12.0) (2018-08-16)
### Bug Fixes
* **extended-device-information:** Fixed Memory Display Bug ([#2641](https://github.com/ionic-team/ionic-native/issues/2641)) ([2ac5282](https://github.com/ionic-team/ionic-native/commit/2ac5282))
* **network:** bind listener to document instead of window ([#2622](https://github.com/ionic-team/ionic-native/issues/2622)) ([d10777a](https://github.com/ionic-team/ionic-native/commit/d10777a))
* **photo-library:** interface missing includeVideos ([3f415f9](https://github.com/ionic-team/ionic-native/commit/3f415f9)), closes [#2624](https://github.com/ionic-team/ionic-native/issues/2624)
### Features
* **fabric:** add fabric plugin ([#2618](https://github.com/ionic-team/ionic-native/issues/2618)) ([9b4fd02](https://github.com/ionic-team/ionic-native/commit/9b4fd02))
* **local-notifications:** add new foreground property ([#2633](https://github.com/ionic-team/ionic-native/issues/2633)) ([229b62c](https://github.com/ionic-team/ionic-native/commit/229b62c))
* **webengage:** add optional config with initialization ([#2637](https://github.com/ionic-team/ionic-native/issues/2637)) ([ca9a702](https://github.com/ionic-team/ionic-native/commit/ca9a702))
<a name="4.11.0"></a>
# [4.11.0](https://github.com/ionic-team/ionic-native/compare/v4.10.1...v4.11.0) (2018-07-29)

View File

@@ -1,8 +1,8 @@
"use strict";
'use strict';
const gulp = require('gulp'),
minimist = require('minimist'),
rename = require("gulp-rename"),
rename = require('gulp-rename'),
tslint = require('gulp-tslint'),
replace = require('gulp-replace'),
_ = require('lodash');
@@ -10,41 +10,44 @@ const gulp = require('gulp'),
const flagConfig = {
string: ['port', 'version', 'ngVersion', 'animations'],
boolean: ['dry-run'],
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
alias: { p: 'port', v: 'version', a: 'ngVersion' },
default: { port: 8000 }
},
flags = minimist(process.argv.slice(2), flagConfig);
/* Docs tasks */
require('./scripts/docs/gulp-tasks')(gulp, flags);
gulp.task('lint', () => {
return gulp.src('src/**/*.ts')
.pipe(tslint({
formatter: "verbose",
configuration: 'tslint.json'
}))
return gulp
.src('src/**/*.ts')
.pipe(
tslint({
formatter: 'verbose',
configuration: 'tslint.json'
})
)
.pipe(tslint.report());
});
gulp.task('plugin:create', () => {
if (flags.n && flags.n !== ''){
const src = flags.m ? './scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl',
if (flags.n && flags.n !== '') {
const src = flags.m
? './scripts/templates/wrap-min.tmpl'
: './scripts/templates/wrap.tmpl',
pluginName = flags.n,
spaced = pluginName.replace(/(?!^)([A-Z])/g, ' $1'),
kebabCase = _.kebabCase(pluginName);
return gulp.src(src)
return gulp
.src(src)
.pipe(replace('{{ PluginName }}', pluginName))
.pipe(replace('{{ Plugin_Name }}', spaced))
.pipe(replace('{{ pluginName }}', _.lowerFirst(pluginName)))
.pipe(replace('{{ plugin-name }}', kebabCase))
.pipe(rename('index.ts'))
.pipe(gulp.dest('./src/@ionic-native/plugins/' + kebabCase));
} else {
console.log("Usage is: gulp plugin:create -n PluginName");
console.log('Usage is: gulp plugin:create -n PluginName');
}
});

View File

@@ -1,18 +1,10 @@
"use strict";
'use strict';
module.exports = config => {
const conf = {
frameworks: [
'jasmine',
'karma-typescript'
],
frameworks: ['jasmine', 'karma-typescript'],
plugins: [
'karma-typescript',
'karma-jasmine',
'karma-phantomjs-launcher'
],
plugins: ['karma-typescript', 'karma-jasmine', 'karma-phantomjs-launcher'],
preprocessors: {
'src/**/*.ts': ['karma-typescript']
@@ -21,22 +13,18 @@ module.exports = config => {
karmaTypescriptConfig: {
bundlerOptions: {
entrypoints: /\.spec\.ts$/,
transforms: [
require("karma-typescript-es6-transform")()
]
transforms: [require('karma-typescript-es6-transform')()]
},
compilerOptions: {
lib: ['es2015', 'dom'],
paths: {
"@ionic-native/core": ["./src/@ionic-native/core"]
'@ionic-native/core': ['./src/@ionic-native/core']
},
baseUrl: '.'
}
},
files: [
{ pattern: 'src/**/*.ts', included: true, watched: true }
],
files: [{ pattern: 'src/**/*.ts', included: true, watched: true }],
reporters: ['progress'],
@@ -44,12 +32,9 @@ module.exports = config => {
colors: true,
logLevel: config.INFO,
autoWatch: true,
browsers: [
'PhantomJS'
],
browsers: ['PhantomJS'],
singleRun: false
};
config.set(conf);
};

132
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "4.11.0",
"version": "4.12.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -53,9 +53,9 @@
"dev": true
},
"JSONStream": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz",
"integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz",
"integrity": "sha512-Y7vfi3I5oMOYIr+WxV8NZxDSwcbNgzdKYsTNInmycOq9bUYwGg9ryu57Wg5NLmCjqdFPNUmpMBo3kSJN9tCbXg==",
"dev": true,
"requires": {
"jsonparse": "^1.2.0",
@@ -1916,22 +1916,22 @@
"dev": true
},
"conventional-changelog": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-2.0.1.tgz",
"integrity": "sha512-WeWcEcR7uBtRZ/uG6DRIlVqsm7UTnxrixaAPoPvfQP7FRPf1qIXL76nGKy4wXq+wO3zOpqYubWUqrYLIL3+xww==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-2.0.3.tgz",
"integrity": "sha512-4bcII9cJHSKb2qi9e8qGF6aJHLf/AB0dokhyR+X6QILTMl77s4l163vK+reXhajvfOYbbHQvsrWybr5+PKZwNA==",
"dev": true,
"requires": {
"conventional-changelog-angular": "^1.6.6",
"conventional-changelog-atom": "^2.0.0",
"conventional-changelog-codemirror": "^2.0.0",
"conventional-changelog-core": "^3.0.0",
"conventional-changelog-ember": "^2.0.0",
"conventional-changelog-core": "^3.1.0",
"conventional-changelog-ember": "^2.0.1",
"conventional-changelog-eslint": "^3.0.0",
"conventional-changelog-express": "^2.0.0",
"conventional-changelog-jquery": "^0.1.0",
"conventional-changelog-jscs": "^0.1.0",
"conventional-changelog-jshint": "^2.0.0",
"conventional-changelog-preset-loader": "^2.0.0"
"conventional-changelog-preset-loader": "^2.0.1"
}
},
"conventional-changelog-angular": {
@@ -1942,14 +1942,6 @@
"requires": {
"compare-func": "^1.3.1",
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-atom": {
@@ -1959,24 +1951,16 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-cli": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.1.tgz",
"integrity": "sha512-gQzMbLyPNYymbzJncJNBapLZTXEtXrq6qmQOJH0w/jVX9fxIli4sLalQgzEPjD7M1noLJd1cIdQAP1R++TkGxg==",
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.5.tgz",
"integrity": "sha512-StqCVo10g194UhyLIhg+M/tTVu6YjGnON/IiQ9Ty/h+dgi9obYAkknwpmmgGJMQ3P3vNRljuZBupz0N2tpdxXg==",
"dev": true,
"requires": {
"add-stream": "^1.0.0",
"conventional-changelog": "^2.0.1",
"conventional-changelog": "^2.0.3",
"lodash": "^4.2.1",
"meow": "^4.0.0",
"tempfile": "^1.1.1"
@@ -2132,20 +2116,12 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-core": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.0.0.tgz",
"integrity": "sha512-D2hApWWsdh4tkNgDjn1KtRapxUJ70Sd+V84btTVJJJ96S3cVRES8Ty3ih0TRkOZmDkw/uS0mxrHSskQ/P/Gvsg==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.1.0.tgz",
"integrity": "sha512-bcZkcFXkqVgG2W8m/1wjlp2wn/BKDcrPgw3/mvSEQtzs8Pax8JbAPFpEQReHY92+EKNNXC67wLA8y2xcNx0rDA==",
"dev": true,
"requires": {
"conventional-changelog-writer": "^4.0.0",
@@ -2168,30 +2144,16 @@
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",
"integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==",
"dev": true
},
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-ember": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.0.tgz",
"integrity": "sha512-s9ZYf3VMdYe8ca8bw1X+he050HZNy9Pm3dBpYA+BunDGFE4Fy7whOvYhWah2U9+j9l6y/whfa0+eHANvZytE9A==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.1.tgz",
"integrity": "sha512-Ym1xLi7YLGooLUpHCJhlXJW5V7u/g+hlYD/+HKt0KqG2qbiBi7e7/HO9aScXTEKUBGMm7m4C443R+eCWQI2ynA==",
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-eslint": {
@@ -2201,14 +2163,6 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-express": {
@@ -2218,14 +2172,6 @@
"dev": true,
"requires": {
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-jquery": {
@@ -2254,20 +2200,12 @@
"requires": {
"compare-func": "^1.3.1",
"q": "^1.5.1"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
}
}
},
"conventional-changelog-preset-loader": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.0.tgz",
"integrity": "sha512-hEWm9o6TxjS9aO1AKaHpl8avSXaUHiUXBT25vJ4ToaDi/gPDqt3OnZkwhIgubADUF+lPqcXpjFTOYcOL4AwyvA==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.1.tgz",
"integrity": "sha512-HiSfhXNzAzG9klIqJaA97MMiNBR4js+53g4Px0k7tgKeCNVXmrDrm+CY+nIqcmG5NVngEPf8rAr7iji1TWW7zg==",
"dev": true
},
"conventional-changelog-writer": {
@@ -6448,9 +6386,9 @@
}
},
"jasmine-core": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.1.0.tgz",
"integrity": "sha1-pHheE11d9lAk38kiSVPfWFvSdmw=",
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.2.1.tgz",
"integrity": "sha512-pa9tbBWgU0EE4SWgc85T4sa886ufuQdsgruQANhECYjwqgV4z7Vw/499aCaP8ZH79JDS4vhm8doDG9HO4+e4sA==",
"dev": true
},
"js-tokens": {
@@ -9544,9 +9482,9 @@
"dev": true
},
"queue": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/queue/-/queue-4.4.2.tgz",
"integrity": "sha512-fSMRXbwhMwipcDZ08enW2vl+YDmAmhcNcr43sCJL8DIg+CFOsoRLG23ctxA+fwNk1w55SePSiS7oqQQSgQoVJQ==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/queue/-/queue-4.5.0.tgz",
"integrity": "sha512-DwxpAnqJuoQa+wyDgQuwkSshkhlqIlWEvwvdAY27fDPunZ2cVJzXU4JyjY+5l7zs7oGLaYAQm4MbLOVFAHFBzA==",
"dev": true,
"requires": {
"inherits": "~2.0.0"
@@ -10061,9 +9999,9 @@
}
},
"rxjs": {
"version": "5.5.11",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz",
"integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==",
"version": "5.5.12",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz",
"integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==",
"dev": true,
"requires": {
"symbol-observable": "1.0.1"
@@ -10091,9 +10029,9 @@
"dev": true
},
"semver": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==",
"dev": true
},
"sentence-case": {

View File

@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "4.11.0",
"version": "4.12.2",
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -14,7 +14,7 @@
"@types/node": "8.10.20",
"canonical-path": "0.0.2",
"child-process-promise": "2.2.1",
"conventional-changelog-cli": "^2.0.1",
"conventional-changelog-cli": "^2.0.5",
"cz-conventional-changelog": "^2.1.0",
"dgeni": "0.4.7",
"dgeni-packages": "0.16.10",
@@ -24,7 +24,7 @@
"gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0",
"gulp-tslint": "6.1.2",
"jasmine-core": "^3.1.0",
"jasmine-core": "^3.2.1",
"karma": "^2.0.5",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.1.2",
@@ -35,10 +35,10 @@
"minimist": "1.2.0",
"node-html-encoder": "0.0.2",
"q": "^1.5.1",
"queue": "^4.4.2",
"queue": "^4.5.0",
"rimraf": "^2.6.2",
"rxjs": "^5.5.11",
"semver": "^5.5.0",
"rxjs": "^5.5.12",
"semver": "^5.5.1",
"tslint": "3.15.1",
"tslint-ionic-rules": "0.0.8",
"typescript": "~2.4.2",

View File

@@ -1,4 +1,4 @@
"use strict";
'use strict';
// Node module dependencies
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
queue = require('queue'),
@@ -15,22 +15,21 @@ const ROOT = path.resolve(path.join(__dirname, '../../')), // root ionic-native
BUILD_DIST_ROOT = path.resolve(ROOT, 'dist/@ionic-native'), // dist directory root path
BUILD_CORE_DIST = path.resolve(BUILD_DIST_ROOT, 'core'); // core dist directory path
// dependency versions
const ANGULAR_VERSION = '*',
RXJS_VERSION = '^5.0.1',
MIN_CORE_VERSION = '^4.2.0',
RXJS_VERSION = '^5.5.11',
MIN_CORE_VERSION = '^4.11.0',
IONIC_NATIVE_VERSION = require(path.resolve(ROOT, 'package.json')).version;
// package dependencies
const CORE_PEER_DEPS = {
'rxjs': RXJS_VERSION
rxjs: RXJS_VERSION
};
const PLUGIN_PEER_DEPS = {
'@ionic-native/core': MIN_CORE_VERSION,
'@angular/core': ANGULAR_VERSION,
'rxjs': RXJS_VERSION
rxjs: RXJS_VERSION
};
// set peer dependencies for all plugins
@@ -44,8 +43,10 @@ fs.mkdirpSync(BUILD_TMP);
console.log('Preparing core module package.json');
CORE_PACKAGE_JSON.version = IONIC_NATIVE_VERSION;
CORE_PACKAGE_JSON.peerDependencies = CORE_PEER_DEPS;
fs.writeJsonSync(path.resolve(BUILD_CORE_DIST, 'package.json'), CORE_PACKAGE_JSON);
fs.writeJsonSync(
path.resolve(BUILD_CORE_DIST, 'package.json'),
CORE_PACKAGE_JSON
);
// Fetch a list of the plugins
const PLUGINS = fs.readdirSync(PLUGINS_PATH);
@@ -59,7 +60,9 @@ const index = pluginsToBuild.indexOf('ignore-errors');
if (index > -1) {
ignoreErrors = true;
pluginsToBuild.splice(index, 1);
console.log('Build will continue even if errors were thrown. Errors will be printed when build finishes.');
console.log(
'Build will continue even if errors were thrown. Errors will be printed when build finishes.'
);
}
if (!pluginsToBuild.length) {
@@ -71,12 +74,9 @@ const QUEUE = queue({
concurrency: require('os').cpus().length
});
// Function to process a single plugin
const addPluginToQueue = pluginName => {
QUEUE.push((callback) => {
QUEUE.push(callback => {
console.log(`Building plugin: ${pluginName}`);
const PLUGIN_BUILD_DIR = path.resolve(BUILD_TMP, 'plugins', pluginName),
@@ -87,7 +87,6 @@ const addPluginToQueue = pluginName => {
fs.mkdirpAsync(PLUGIN_BUILD_DIR) // create tmp build dir
.then(() => fs.mkdirpAsync(path.resolve(BUILD_DIST_ROOT, pluginName))) // create dist dir
.then(() => {
// Write tsconfig.json
const tsConfig = JSON.parse(JSON.stringify(PLUGIN_TS_CONFIG));
tsConfig.files = [PLUGIN_SRC_PATH];
@@ -104,42 +103,39 @@ const addPluginToQueue = pluginName => {
packageJson.name = `@ionic-native/${pluginName}`;
packageJson.version = IONIC_NATIVE_VERSION;
return fs.writeJsonAsync(path.resolve(BUILD_DIST_ROOT, pluginName, 'package.json'), packageJson);
return fs.writeJsonAsync(
path.resolve(BUILD_DIST_ROOT, pluginName, 'package.json'),
packageJson
);
})
.then(() => {
// compile the plugin
exec(`${ROOT}/node_modules/.bin/ngc -p ${tsConfigPath}`, (err, stdout, stderr) => {
if (err) {
if (!ignoreErrors) {
// oops! something went wrong.
console.log(err);
callback(`\n\nBuilding ${pluginName} failed.`);
return;
} else {
errors.push(err);
exec(
`${ROOT}/node_modules/.bin/ngc -p ${tsConfigPath}`,
(err, stdout, stderr) => {
if (err) {
if (!ignoreErrors) {
// oops! something went wrong.
console.log(err);
callback(`\n\nBuilding ${pluginName} failed.`);
return;
} else {
errors.push(err);
}
}
// we're done with this plugin!
callback();
}
// we're done with this plugin!
callback();
});
);
})
.catch(callback);
}); // QUEUE.push end
};
pluginsToBuild.forEach(addPluginToQueue);
QUEUE.start((err) => {
QUEUE.start(err => {
if (err) {
console.log('Error building plugins.');
console.log(err);
@@ -155,5 +151,4 @@ QUEUE.start((err) => {
} else {
console.log('Done processing plugins!');
}
});

View File

@@ -1,11 +1,10 @@
"use strict";
'use strict';
// Node module dependencies
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
queue = require('queue'),
path = require('path'),
exec = require('child-process-promise').exec;
const ROOT = path.resolve(path.join(__dirname, '../../')),
DIST = path.resolve(ROOT, 'dist', '@ionic-native');
@@ -20,15 +19,16 @@ const QUEUE = queue({
});
PACKAGES.forEach(packageName => {
QUEUE.push(done => {
console.log(`Publishing @ionic-native/${packageName}`);
const packagePath = path.resolve(DIST, packageName);
exec(`npm publish ${packagePath} ${FLAGS}`)
.then(() => done())
.catch((e) => {
if (e.stderr && e.stderr.indexOf('previously published version') === -1) {
.catch(e => {
if (
e.stderr &&
e.stderr.indexOf('previously published version') === -1
) {
failedPackages.push({
cmd: e.cmd,
stderr: e.stderr
@@ -36,13 +36,10 @@ PACKAGES.forEach(packageName => {
}
done();
});
});
});
QUEUE.start((err) => {
QUEUE.start(err => {
if (err) {
console.log('Error publishing ionic-native. ', err);
} else if (failedPackages.length > 0) {
@@ -51,8 +48,4 @@ QUEUE.start((err) => {
} else {
console.log('Done publishing ionic-native!');
}
});

View File

@@ -9,37 +9,41 @@ exec(`git branch | grep \\* | cut -d ' ' -f2`)
const branch = output.stdout.trim();
if (branch !== 'master') {
console.log('Merging master branch in ...');
// not on master branch
// let's test the changes that were made
return exec(`git merge origin master`);
}
})
.then((output) => {
.then(output => {
if (output && output.stderr) {
return Promise.reject(output.stderr);
}
console.log('Checking for differences ...');
return exec(`git diff --name-status origin master`)
return exec(`git diff --name-status origin master`);
})
.then((output) => {
.then(output => {
if (output && output.stderr) {
return Promise.reject(output.stderr);
}
diff = output.stdout;
diff = diff.replace(/A\s+/g, '');
diff = diff.match(/src\/@ionic-native\/plugins\/([a-zA-Z0-9\-]+)\/index\.ts/g);
diff = diff.match(
/src\/@ionic-native\/plugins\/([a-zA-Z0-9\-]+)\/index\.ts/g
);
if (!diff) process.exit();
console.log(`${ diff.length } plugins were modified. We will now build them to verify they still work.`);
console.log(
`${
diff.length
} plugins were modified. We will now build them to verify they still work.`
);
return exec('npm run build:core --silent');
})
.then((output) => {
.then(output => {
if (output && output.stderr) {
return Promise.reject(output.stderr);
}
@@ -47,11 +51,13 @@ exec(`git branch | grep \\* | cut -d ' ' -f2`)
console.log('Built core library successfully ...');
console.log('Building plugins ...');
diff = diff.map(text => text.replace('src/@ionic-native/plugins/', '').replace('/index.ts', ''));
diff = diff.map(text =>
text.replace('src/@ionic-native/plugins/', '').replace('/index.ts', '')
);
return exec(`npm run build:modules ${diff.join(' ')} --silent`);
})
.then((output) => {
.then(output => {
if (output && output.stderr) {
console.log(output.stderr);
process.exit(1);

View File

@@ -2,14 +2,7 @@ import 'core-js';
import { Observable } from 'rxjs/Observable';
import {
Cordova,
CordovaCheck,
CordovaInstance,
CordovaProperty,
InstanceProperty,
Plugin
} from './decorators';
import { Cordova, CordovaCheck, CordovaInstance, CordovaProperty, InstanceProperty, Plugin } from './decorators';
import { IonicNativePlugin } from './ionic-native-plugin';
import { ERR_CORDOVA_NOT_AVAILABLE, ERR_PLUGIN_NOT_INSTALLED } from './plugin';

View File

@@ -1,14 +1,7 @@
import { Observable } from 'rxjs/Observable';
import { _throw } from 'rxjs/observable/throw';
import { Observable } from 'rxjs/Observable';
import {
checkAvailability,
instanceAvailability,
overrideFunction,
wrap,
wrapInstance
} from './plugin';
import { checkAvailability, instanceAvailability, overrideFunction, wrap, wrapInstance } from './plugin';
import { getPlugin, getPromise } from './util';
export interface PluginConfig {

View File

@@ -12,20 +12,38 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* ```typescript
* import { AES256 } from '@ionic-native/aes-256';
*
*
* constructor(private aES256: AES256) { }
* private secureKey: string;
* private secureIV: string;
*
* constructor(private aes256: AES256) {
* this.generateSecureKeyAndIV(); // To generate the random secureKey and secureIV
* }
*
* ...
*
* async generateSecureKeyAndIV() {
* this.secureKey = await this.aes256.generateSecureKey('random password 12345'); // Returns a 32 bytes string
* this.secureIV = await this.aes256.generateSecureIV('random password 12345'); // Returns a 16 bytes string
* }
*
* this.aES256.encrypt('12345678123456781234567812345678', '1234567812345678', 'testdata')
* this.aes256.encrypt(this.secureKey, this.secureIV, 'testdata')
* .then(res => console.log('Encrypted Data: ',res))
* .catch((error: any) => console.error(error));
*
* this.aES256.decrypt('12345678123456781234567812345678', '1234567812345678', 'encryptedData')
* this.aes256.decrypt(this.secureKey, this.secureIV, 'encryptedData')
* .then(res => console.log('Decrypted Data : ',res))
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureKey('random password 12345')
* .then(res => console.log('Secure Key : ',res))
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureIV('random password 12345')
* .then(res => console.log('Secure IV : ',res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
@@ -63,4 +81,26 @@ export class AES256 extends IonicNativePlugin {
return;
}
/**
* This function used to generate a secure key based on an password. Perfect if you want to delegate the key generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when key is generated.
*/
@Cordova()
generateSecureKey(password: string): Promise<string> {
return;
}
/**
* This function used to generate a secure IV based on an password. Perfect if you want to delegate the IV generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when IV is generated.
*/
@Cordova()
generateSecureIV(password: string): Promise<string> {
return;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,11 @@ import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Extended Device Information
* @description
* Retrieves additional device information that is not provided by other plugins
* Retrieves additional device information from the Device Hardware
* - memory
* - cpumhz
* - totalstorage
* - freestorage
*
* @usage
* ```typescript
@@ -22,23 +26,23 @@ import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
pluginName: 'ExtendedDeviceInformation',
plugin: 'cordova-plugin-extended-device-information',
pluginRef: 'extended-device-information',
repo: 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
repo:
'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
platforms: ['Android']
})
@Injectable()
export class ExtendedDeviceInformation extends IonicNativePlugin {
/**
* Get the device's memory size
*/
@CordovaProperty
memory: number;
memory: string;
/**
* Get the device's CPU mhz
*/
@CordovaProperty
cpumhz: string;
cpumhz: number;
/**
* Get the total storage
@@ -46,4 +50,9 @@ export class ExtendedDeviceInformation extends IonicNativePlugin {
@CordovaProperty
totalstorage: string;
/**
* Get the total storage
*/
@CordovaProperty
freestorage: number;
}

View File

@@ -0,0 +1,425 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface Attributes {
[index: string]: String;
}
/**
* @name Crashlytics
* @description
* API for interacting with the Crashlytics kit.
*
* https://docs.fabric.io/crashlytics/index.html
*
* @usage
* ```typescript
* import { Crashlytics } from '@ionic-native/fabric';
*
*
* constructor(private crashlytics: Crashlytics) { }
*
* ...
*
* try {
* await this.loadData();
* } catch (e) {
* this.crashlytics.addLog("Error while loading data");
* this.crashlytics.sendNonFatalCrash(e.message || e);
* }
*
* ```
*/
@Plugin({
pluginName: 'Crashlytics',
plugin: 'cordova-fabric-plugin',
pluginRef: 'window.fabric.Crashlytics',
repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
install:
'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Crashlytics extends IonicNativePlugin {
/**
* Add logging that will be sent with your crash data. This logging will not show up
* in the system.log and will only be visible in your Crashlytics dashboard.
* @param message {string}
*/
@Cordova({ sync: true })
addLog(message: string): void {
return;
}
/**
* Used to simulate a native platform crash (useful for testing Crashlytics logging).
*/
@Cordova({ sync: true })
sendCrash(): void {
return;
}
/**
* Used to log a non-fatal error message (Android only).
*/
@Cordova({ sync: true })
sendNonFatalCrash(message: string, stacktrace?: any): void {
return;
}
/**
* Used to record a non-fatal error message (iOS only).
*/
@Cordova({ sync: true })
recordError(message: string, code: number): void {
return;
}
/**
* Sets the user's identifier for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setUserIdentifier(userId: string): void {
return;
}
/**
* Sets the user's name for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setUserName(userName: string): void {
return;
}
/**
* Sets the user's email address for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setUserEmail(email: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setStringValueForKey(value: string, key: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setIntValueForKey(value: number, key: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setBoolValueForKey(value: boolean, key: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setFloatValueForKey(value: number, key: string): void {
return;
}
}
/**
* @name Answers
* @description
* API for interacting with the Answers kit.
*
* https://docs.fabric.io/crashlytics/index.html
*
* @usage
* ```typescript
* import { Answers } from '@ionic-native/fabric';
*
*
* constructor(private answers: Answers) { }
*
* ...
*
* this.answers.sendCustomEvent('SomeCustomEvent', { some: "attributes" })
*
* ```
*/
@Plugin({
pluginName: 'Answers',
plugin: 'cordova-fabric-plugin',
pluginRef: 'window.fabric.Answers',
repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
install:
'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Answers extends IonicNativePlugin {
/**
* Sends the Purchase tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#purchase
*
* @param itemPrice The item's amount in the currency specified.
* @param currency The ISO4217 currency code.
* @param success Was the purchase completed succesfully?
* @param itemName The human-readable name for the item.
* @param itemType The category the item falls under.
* @param itemId A unique identifier used to track the item.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendPurchase(
itemPrice?: number,
currency?: string,
success?: boolean,
itemName?: string,
itemType?: string,
itemId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Add To Cart tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#add-to-cart
*
* @param itemPrice The item's amount in the currency specified.
* @param currency The ISO4217 currency code.
* @param itemName The human-readable name for the item.
* @param itemType The category the item falls under.
* @param itemId A unique identifier used to track the item.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendAddToCart(
itemPrice?: number,
currency?: string,
itemName?: string,
itemType?: string,
itemId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Start Checkout tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#start-checkout
*
* @param totalPrice The total price of all items in cart in the currency specified.
* @param currency The ISO4217 currency code.
* @param itemCount The count of items in cart.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendStartCheckout(
totalPrice?: number,
currency?: string,
itemCount?: number,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Search tracking event.
*
* https://docs.fabric.io/android/answers/answers-events.html#search
*
* @param query What the user is searching for.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendSearch(query: string, attributes?: Attributes): void {
return;
}
/**
* Sends the Share tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#share
*
* @param method The method used to share content.
* @param contentName The description of the content.
* @param contentType The type or genre of content.
* @param contentId A unique key identifying the content.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendShare(
method?: string,
contentName?: string,
contentType?: string,
contentId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Rated Content tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#rated-content
*
* @param rating An integer rating of the content.
* @param contentName The human-readable name of content.
* @param contentType The category your item falls under.
* @param contentId A unique identifier used to track the item.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendRatedContent(
rating?: number,
contentName?: string,
contentType?: string,
contentId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Sign Up tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#sign-up
*
* @param method An optional description of the sign up method (Twitter, Facebook, etc.); defaults to "Direct".
* @param success An optional flag that indicates sign up success; defaults to true.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendSignUp(
method?: string,
success?: boolean,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Log In tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#log-in
*
* @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
* @param success An optional flag that indicates sign in success; defaults to true.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendLogIn(method?: string, success?: boolean, attributes?: Attributes): void {
return;
}
/**
* Sends the Invite tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#invite
*
* @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendInvite(method?: string, attributes?: Attributes): void {
return;
}
/**
* Sends the Level Start tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#level-start
*
* @param levelName String key describing the level.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendLevelStart(levelName?: string, attributes?: Attributes): void {
return;
}
/**
* Sends the Level End tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#level-end
*
* @param levelName String key describing the level.
* @param score The score for this level.
* @param success Completed the level or failed trying.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendLevelEnd(
levelName?: string,
score?: number,
success?: boolean,
attributes?: Attributes
): void {
return;
}
/**
* Send the Content View tracking event.
*
* https://docs.fabric.io/android/answers/answers-events.html#content-view
*/
@Cordova({ sync: true })
sendContentView(
name: string,
type?: string,
id?: string,
attributes?: Attributes
): void {
return;
}
/**
* Shortcut for sendContentView(...) using type of "Screen".
*/
@Cordova({ sync: true })
sendScreenView(name: string, id: string, attributes?: Attributes): void {
return;
}
/**
* Send a custom tracking event with the given name.
*
* https://docs.fabric.io/android/answers/answers-events.html#custom-event
*/
@Cordova({ sync: true })
sendCustomEvent(name: string, attributes?: Attributes): void {
return;
}
}

View File

@@ -38,10 +38,9 @@ export interface IDynamicLink {
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
*
* ...
*
* // Handle the logic here after opening the app with the Dynamic link
* this.firebaseDynamicLinks.onDynamicLink()
* .then((res: any) => console.log(res)) //Handle the logic here after opening the app with the Dynamic link
* .catch((error:any) => console.log(error));
* .subscribe((res: any) => console.log(res), (error:any) => console.log(error));
* ```
*
* @interfaces

View File

@@ -154,7 +154,9 @@ export class HTTP extends IonicNativePlugin {
* @param url {string}
*/
@Cordova({ sync: true })
getCookieString(url: string): string { return; }
getCookieString(url: string): string {
return;
}
/**
* Get global request timeout value in seconds.
@@ -173,26 +175,15 @@ export class HTTP extends IonicNativePlugin {
setRequestTimeout(timeout: number): void {}
/**
* Enable or disable SSL Pinning. This defaults to false.
*
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this [stackoverflow answer](https://stackoverflow.com/questions/16583428/how-to-convert-an-ssl-certificate-in-linux/16583429#16583429). You want to convert it to a DER encoded certificate with a .cer extension.
*
* As an alternative, you can store your .cer files in the www/certificates folder.
* @param enable {boolean} Set to true to enable
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
* Set SSL Cert handling mode, being one of the following values
* default: default SSL cert handling using system's CA certs
* nocheck: disable SSL cert checking, trusting all certs (meant to be used only for testing purposes)
* pinned: trust only provided certs
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setsslcertmode
* @param {'default' | 'nocheck' | 'pinned'} mode SSL Cert handling mode
*/
@Cordova()
enableSSLPinning(enable: boolean): Promise<void> {
return;
}
/**
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
* @param accept {boolean} Set to true to accept
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
acceptAllCerts(accept: boolean): Promise<void> {
setSSLCertMode(mode: 'default' | 'nocheck' | 'pinned'): Promise<void> {
return;
}
@@ -202,7 +193,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
disableRedirect(disable: boolean): Promise<void> { return; }
disableRedirect(disable: boolean): Promise<void> {
return;
}
/**
* Make a POST request

View File

@@ -15,25 +15,42 @@ export interface InAppBrowserOptions {
clearcache?: 'yes';
/** Set to yes to have the session cookie cache cleared before the new window is opened. */
clearsessioncache?: 'yes';
/** (Android Only) set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
/** (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
* (iOS) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
closebuttoncaption?: string;
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default Done button's color. Only applicable if toolbar is not disabled. */
closebuttoncolor?: string;
/** (Android Only) Set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
zoom?: 'yes' | 'no';
/** Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
/** (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
* If there is no previous page, the InAppBrowser will close. The default value is yes, so you must set it to no if you want the back button to simply close the InAppBrowser. */
hardwareback?: 'yes' | 'no';
/** Set to yes to prevent HTML5 audio or video from autoplaying (defaults to no). */
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
/** (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
* (iOS) Set to yes or no to turn the toolbar navigation buttons on or off (defaults to no). Only applicable if toolbar is not disabled.*/
hidenavigationbuttons?: 'yes' | 'no';
/** (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
hideurlbar?: 'yes' | 'no';
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color. Only applicable if navigation buttons are visible. */
navigationbuttoncolor?: string;
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.*/
toolbarcolor?: string;
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
shouldPauseOnSuspend?: 'yes' | 'no';
/** (Android Only) Set to yes to show a close button in the footer similar to the iOS Done button. The close button will appear the same as for the header hence use closebuttoncaption and closebuttoncolor to set its properties */
footer?: 'yes' | 'no';
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb) , and it will change the footer color from default. Only has effect if user has footer set to yes */
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb), and it will change the footer color from default. Only has effect if user has footer set to yes */
footercolor?: string;
/** (iOS Only) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
closebuttoncaption?: string;
/** (iOS Only) Set to yes or no (default is no). Turns on/off the UIWebViewBounce property. */
disallowoverscroll?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to turn the toolbar on or off for the InAppBrowser (defaults to yes) */
toolbar?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to make the toolbar translucent(semi-transparent) (defaults to yes). Only applicable if toolbar is not disabled. */
toolbartranslucent?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to prevent viewport scaling through a meta tag (defaults to no). */
enableViewportScale?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
@@ -54,7 +71,8 @@ export interface InAppBrowserOptions {
/** (Windows only) Set to yes to create the browser control without a border around it.
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window. */
fullscreen?: 'yes';
/** (Android Only) Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is no, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is yes and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. (defaults to yes). */
useWideViewPort?: 'yes' | 'no';
/**
* @hidden
*/

View File

@@ -17,7 +17,6 @@ export enum ELocalNotificationTriggerUnit {
}
export interface ILocalNotificationTrigger {
/** ***** FIX ***** */
/**
@@ -192,7 +191,6 @@ export interface ILocalNotificationProgressBar {
}
export interface ILocalNotification {
/**
* A unique identifier required to clear, cancel, update or retrieve the local notification in the future
* Default: 0
@@ -267,7 +265,7 @@ export interface ILocalNotification {
* the value of the key 1 will be used as the 'on' timing, the value of
* the key 2 will be used as the 'off' timing
*/
led?: {color: string, on: number, off: number} | any[] | boolean | string;
led?: { color: string; on: number; off: number } | any[] | boolean | string;
/**
* Notification priority.
@@ -396,8 +394,12 @@ export interface ILocalNotification {
* ANDROID ONLY
* Set the token for the media session
*/
mediaSession?: string;
mediaSession?: string;
/**
* Make this notification show when app in foreground.
*/
foreground?: boolean;
}
/**
@@ -458,7 +460,6 @@ export interface ILocalNotification {
})
@Injectable()
export class LocalNotifications extends IonicNativePlugin {
/**
* Schedules a single or multiple notifications
* @param options {Notification | Array<ILocalNotification>} optional
@@ -466,7 +467,7 @@ export class LocalNotifications extends IonicNativePlugin {
@Cordova({
sync: true
})
schedule(options?: ILocalNotification | Array<ILocalNotification>): void { }
schedule(options?: ILocalNotification | Array<ILocalNotification>): void {}
/**
* Updates a previously scheduled notification. Must include the id in the options parameter.
@@ -475,7 +476,7 @@ export class LocalNotifications extends IonicNativePlugin {
@Cordova({
sync: true
})
update(options?: ILocalNotification): void { }
update(options?: ILocalNotification): void {}
/**
* Clears single or multiple notifications
@@ -483,14 +484,18 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<any>} Returns a promise when the notification had been cleared
*/
@Cordova()
clear(notificationId: any): Promise<any> { return; }
clear(notificationId: any): Promise<any> {
return;
}
/**
* Clears all notifications
* @returns {Promise<any>} Returns a promise when all notifications have cleared
*/
@Cordova()
clearAll(): Promise<any> { return; }
clearAll(): Promise<any> {
return;
}
/**
* Cancels single or multiple notifications
@@ -498,14 +503,18 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<any>} Returns a promise when the notification is canceled
*/
@Cordova()
cancel(notificationId: any): Promise<any> { return; }
cancel(notificationId: any): Promise<any> {
return;
}
/**
* Cancels all notifications
* @returns {Promise<any>} Returns a promise when all notifications are canceled
*/
@Cordova()
cancelAll(): Promise<any> { return; }
cancelAll(): Promise<any> {
return;
}
/**
* Checks presence of a notification
@@ -513,7 +522,9 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
isPresent(notificationId: number): Promise<boolean> { return; }
isPresent(notificationId: number): Promise<boolean> {
return;
}
/**
* Checks is a notification is scheduled
@@ -521,7 +532,9 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
isScheduled(notificationId: number): Promise<boolean> { return; }
isScheduled(notificationId: number): Promise<boolean> {
return;
}
/**
* Checks if a notification is triggered
@@ -529,28 +542,36 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
isTriggered(notificationId: number): Promise<boolean> { return; }
isTriggered(notificationId: number): Promise<boolean> {
return;
}
/**
* Get all the notification ids
* @returns {Promise<Array<number>>}
*/
@Cordova()
getIds(): Promise<Array<number>> { return; }
getIds(): Promise<Array<number>> {
return;
}
/**
* Get the ids of triggered notifications
* @returns {Promise<Array<number>>}
*/
@Cordova()
getTriggeredIds(): Promise<Array<number>> { return; }
getTriggeredIds(): Promise<Array<number>> {
return;
}
/**
* Get the ids of scheduled notifications
* @returns {Promise<Array<number>>} Returns a promise
*/
@Cordova()
getScheduledIds(): Promise<Array<number>> { return; }
getScheduledIds(): Promise<Array<number>> {
return;
}
/**
* Get a notification object
@@ -558,7 +579,9 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<ILocalNotification>}
*/
@Cordova()
get(notificationId: any): Promise<ILocalNotification> { return; }
get(notificationId: any): Promise<ILocalNotification> {
return;
}
/**
* Get a scheduled notification object
@@ -566,7 +589,9 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<ILocalNotification>}
*/
@Cordova()
getScheduled(notificationId: any): Promise<ILocalNotification> { return; }
getScheduled(notificationId: any): Promise<ILocalNotification> {
return;
}
/**
* Get a triggered notification object
@@ -574,42 +599,54 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<ILocalNotification>}
*/
@Cordova()
getTriggered(notificationId: any): Promise<ILocalNotification> { return; }
getTriggered(notificationId: any): Promise<ILocalNotification> {
return;
}
/**
* Get all notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAll(): Promise<Array<ILocalNotification>> { return; }
getAll(): Promise<Array<ILocalNotification>> {
return;
}
/**
* Get all scheduled notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAllScheduled(): Promise<Array<ILocalNotification>> { return; }
getAllScheduled(): Promise<Array<ILocalNotification>> {
return;
}
/**
* Get all triggered notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAllTriggered(): Promise<Array<ILocalNotification>> { return; }
getAllTriggered(): Promise<Array<ILocalNotification>> {
return;
}
/**
* Request permission to show notifications if not already granted.
* @returns {Promise<boolean>}
*/
@Cordova()
requestPermission(): Promise<boolean> { return; }
requestPermission(): Promise<boolean> {
return;
}
/**
* Informs if the app has the permission to show notifications.
* @returns {Promise<boolean>}
*/
@Cordova()
hasPermission(): Promise<boolean> { return; }
hasPermission(): Promise<boolean> {
return;
}
/**
* Adds a group of actions
@@ -618,7 +655,12 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
addActions(groupId: any, actions: Array<ILocalNotificationAction>): Promise<any> { return; }
addActions(
groupId: any,
actions: Array<ILocalNotificationAction>
): Promise<any> {
return;
}
/**
* Removes a group of actions
@@ -626,7 +668,9 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
removeActions(groupId: any): Promise<any> { return; }
removeActions(groupId: any): Promise<any> {
return;
}
/**
* Checks if a group of actions is defined
@@ -634,7 +678,9 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<boolean>} Whether the group is defined
*/
@Cordova()
hasActions(groupId: any): Promise<boolean> { return; }
hasActions(groupId: any): Promise<boolean> {
return;
}
/**
* Gets the (platform specific) default settings.
@@ -643,7 +689,9 @@ export class LocalNotifications extends IonicNativePlugin {
@Cordova({
sync: true
})
getDefaults(): Promise<any> { return; }
getDefaults(): Promise<any> {
return;
}
/**
* Overwrites the (platform specific) default settings.
@@ -652,7 +700,9 @@ export class LocalNotifications extends IonicNativePlugin {
@Cordova({
sync: true
})
setDefaults(defaults: any): Promise<any> { return; }
setDefaults(defaults: any): Promise<any> {
return;
}
/**
* Sets a callback for a specific event
@@ -664,7 +714,9 @@ export class LocalNotifications extends IonicNativePlugin {
clearFunction: 'un',
clearWithArgs: true
})
on(eventName: string): Observable<any> { return; }
on(eventName: string): Observable<any> {
return;
}
/**
* Not an official interface, however its possible to manually fire events.
@@ -674,12 +726,14 @@ export class LocalNotifications extends IonicNativePlugin {
@Cordova({
sync: true
})
fireEvent(eventName: string, args: any): void { }
fireEvent(eventName: string, args: any): void {}
/**
* Fire queued events once the device is ready and all listeners are registered.
* @returns {Promise<any>}
*/
@Cordova()
fireQueuedEvents(): Promise<any> { return; }
fireQueuedEvents(): Promise<any> {
return;
}
}

View File

@@ -89,7 +89,8 @@ export class Network extends IonicNativePlugin {
*/
@Cordova({
eventObservable: true,
event: 'offline'
event: 'offline',
element: document
})
onDisconnect(): Observable<any> {
return;
@@ -101,7 +102,8 @@ export class Network extends IonicNativePlugin {
*/
@Cordova({
eventObservable: true,
event: 'online'
event: 'online',
element: document
})
onConnect(): Observable<any> {
return;

View File

@@ -700,7 +700,7 @@ export class OneSignal extends IonicNativePlugin {
}
/**
* Clears all OneSignla notifications
* Clears all OneSignal notifications
*/
@Cordova({ sync: true })
clearOneSignalNotifications(): void {}

View File

@@ -1,11 +1,11 @@
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Open Native Settings
* @description
* Plugin to open native screens of iOS/android settings
* @usage
* Plugin to open native screens of iOS/android settings
* @usage
* You can open any of these settings:
* ```
* "about", // ios
@@ -78,7 +78,7 @@ import { Injectable } from '@angular/core';
"wifi_ip", // android
"wifi", // ios, android
"wireless" // android
```
```
* ```typescript
* import { OpenNativeSettings } from '@ionic-native/open-native-settings';
*
@@ -99,13 +99,13 @@ import { Injectable } from '@angular/core';
})
@Injectable()
export class OpenNativeSettings extends IonicNativePlugin {
/**
* Opens a setting dialog
* @param setting {string} setting name
* @param setting {string|array} setting name
* @return {Promise<any>}
*/
@Cordova()
open(setting: string): Promise<any> { return; }
open(setting: string | [string, boolean]): Promise<any> {
return;
}
}

View File

@@ -252,6 +252,7 @@ export interface GetLibraryOptions {
chunkTimeSec?: number;
useOriginalFileNames?: boolean;
includeAlbumData?: boolean;
includeVideos?: boolean;
maxItems?: number;
}

View File

@@ -1,10 +1,12 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaInstance, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const window: any;
export type EventResponse = RegistrationEventResponse & NotificationEventResponse & Error;
export type EventResponse = RegistrationEventResponse &
NotificationEventResponse &
Error;
export interface RegistrationEventResponse {
/**
@@ -13,7 +15,6 @@ export interface RegistrationEventResponse {
registrationId: string;
}
export interface NotificationEventResponse {
/**
* The text of the push message sent from the 3rd party service.
@@ -111,6 +112,13 @@ export interface IOSPushOptions {
* Action Buttons on iOS - https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#action-buttons-1
*/
categories?: CategoryArray;
/**
* If true the device will be set up to receive VoIP Push notifications and the
* other options will be ignored since VoIP notifications are silent
* notifications that should be handled in the "notification" event.
*/
voip?: boolean | string;
}
export interface CategoryArray {
@@ -203,7 +211,6 @@ export interface BrowserPushOptions {
* Default: http://push.api.phonegap.com/v1/push Optional.
*/
pushServiceURL?: string;
}
export interface PushOptions {
@@ -314,7 +321,6 @@ export type PushEvent = string;
})
@Injectable()
export class Push extends IonicNativePlugin {
/**
* Init push notifications
* @param options {PushOptions}
@@ -329,7 +335,9 @@ export class Push extends IonicNativePlugin {
* @return {Promise<{isEnabled: boolean}>} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
*/
@Cordova()
hasPermission(): Promise<{ isEnabled: boolean }> { return; }
hasPermission(): Promise<{ isEnabled: boolean }> {
return;
}
/**
* Create a new notification channel for Android O and above.
@@ -338,7 +346,9 @@ export class Push extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
createChannel(channel?: Channel): Promise<any> { return; }
createChannel(channel?: Channel): Promise<any> {
return;
}
/**
* Delete a notification channel for Android O and above.
@@ -347,15 +357,18 @@ export class Push extends IonicNativePlugin {
@Cordova({
callbackOrder: 'reverse'
})
deleteChannel(id?: string): Promise<any> { return; }
deleteChannel(id?: string): Promise<any> {
return;
}
/**
* Returns a list of currently configured channels.
* @return {Promise<Channel[]>}
*/
@Cordova()
listChannels(): Promise<Channel[]> { return; }
listChannels(): Promise<Channel[]> {
return;
}
}
/**
@@ -367,11 +380,12 @@ export class Push extends IonicNativePlugin {
pluginRef: 'PushNotification'
})
export class PushObject {
private _objectInstance: any;
constructor(options: PushOptions) {
if (checkAvailability('PushNotification', 'init', 'PushNotification') === true) {
if (
checkAvailability('PushNotification', 'init', 'PushNotification') === true
) {
this._objectInstance = window.PushNotification.init(options);
}
}
@@ -386,7 +400,9 @@ export class PushObject {
clearFunction: 'off',
clearWithArgs: true
})
on(event: PushEvent): Observable<EventResponse> { return; }
on(event: PushEvent): Observable<EventResponse> {
return;
}
/**
* The unregister method is used when the application no longer wants to receive push notifications.
@@ -394,7 +410,9 @@ export class PushObject {
* so you will need to re-register them if you want them to function again without an application reload.
*/
@CordovaInstance()
unregister(): Promise<any> { return; }
unregister(): Promise<any> {
return;
}
/**
* Set the badge count visible when the app is not running
@@ -407,13 +425,17 @@ export class PushObject {
@CordovaInstance({
callbackOrder: 'reverse'
})
setApplicationIconBadgeNumber(count?: number): Promise<any> { return; };
setApplicationIconBadgeNumber(count?: number): Promise<any> {
return;
}
/**
* Get the current badge count visible when the app is not running
* successHandler gets called with an integer which is the current badge count
*/
@CordovaInstance()
getApplicationIconBadgeNumber(): Promise<number> { return; }
getApplicationIconBadgeNumber(): Promise<number> {
return;
}
/**
* iOS only
@@ -424,13 +446,17 @@ export class PushObject {
@CordovaInstance({
callbackOrder: 'reverse'
})
finish(id?: string): Promise<any> { return; }
finish(id?: string): Promise<any> {
return;
}
/**
* Tells the OS to clear all notifications from the Notification Center
*/
@CordovaInstance()
clearAllNotifications(): Promise<any> { return; }
clearAllNotifications(): Promise<any> {
return;
}
/**
* The subscribe method is used when the application wants to subscribe a new topic to receive push notifications.
@@ -438,7 +464,9 @@ export class PushObject {
* @return {Promise<any>}
*/
@CordovaInstance()
subscribe(topic: string): Promise<any> { return; }
subscribe(topic: string): Promise<any> {
return;
}
/**
* The unsubscribe method is used when the application no longer wants to receive push notifications from a specific topic but continue to receive other push messages.
@@ -446,6 +474,7 @@ export class PushObject {
* @return {Promise<any>}
*/
@CordovaInstance()
unsubscribe(topic: string): Promise<any> { return; }
unsubscribe(topic: string): Promise<any> {
return;
}
}

View File

@@ -23,18 +23,17 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
plugin: 'cordova-plugin-webengage',
pluginRef: 'webengage',
repo: 'https://github.com/WebEngage/cordova-plugin',
install: '',
installVariables: [],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Webengage extends IonicNativePlugin {
/**
* Initializes WebEngage SDK
* @param {any} [config]
* @return {Promise<any>}
*/
@Cordova()
engage(): Promise<any> {
engage(config?: any): Promise<any> {
return;
}
@@ -52,34 +51,33 @@ export class Webengage extends IonicNativePlugin {
/**
* Tracks event
* @param {string} eventName
* @param {any} attributes
* @param {any} [attributes]
* @return {Promise<any>}
*/
@Cordova()
track(eventName: string, attributes: any): Promise<any> {
track(eventName: string, attributes?: any): Promise<any> {
return;
}
/**
* Tracks screen
* @param {string} eventName
* @param {any} screenData
* @param {any} [screenData]
* @return {Promise<any>}
*/
@Cordova()
screen(screenName: string, screenData: any): Promise<any> {
screen(screenName: string, screenData?: any): Promise<any> {
return;
}
}
/**
* @hidden
*/
@Plugin({
pluginName: 'Webengage',
plugin: 'cordova-plugin-webengage',
pluginRef: 'webengage.user',
repo: 'https://github.com/WebEngage/cordova-plugin',
install: '',
installVariables: [],
platforms: ['Android', 'iOS']
pluginRef: 'webengage.user'
})
@Injectable()
export class WebengageUser extends IonicNativePlugin {
@@ -114,14 +112,13 @@ export class WebengageUser extends IonicNativePlugin {
}
}
/**
* @hidden
*/
@Plugin({
pluginName: 'Webengage',
plugin: 'cordova-plugin-webengage',
pluginRef: 'webengage.push',
repo: 'https://github.com/WebEngage/cordova-plugin',
install: '',
installVariables: [],
platforms: ['Android', 'iOS']
pluginRef: 'webengage.push'
})
@Injectable()
export class WebengagePush extends IonicNativePlugin {
@@ -147,14 +144,13 @@ export class WebengagePush extends IonicNativePlugin {
}
}
/**
* @hidden
*/
@Plugin({
pluginName: 'Webengage',
plugin: 'cordova-plugin-webengage',
pluginRef: 'webengage.notification',
repo: 'https://github.com/WebEngage/cordova-plugin',
install: '',
installVariables: [],
platforms: ['Android', 'iOS']
pluginRef: 'webengage.notification'
})
@Injectable()
export class WebengageNotification extends IonicNativePlugin {