Compare commits

...

38 Commits

Author SHA1 Message Date
gurnard123 b005efc52b docs(intel-security): fix references (#1305)
corrected the documentation to correct the read code snippet. As detailed here:
https://forum.ionicframework.com/t/crypto-libraries-with-ionic-2/84629
2017-03-30 15:50:26 -04:00
mugenyi henry f4c4317f16 docs(admob): fix package name (#1301)
remove the dash "import { AdMob, AdMobOptions, AdSize, AdExtras } from '@ionic-native/ad-mob';" to import { AdMob, AdMobOptions, AdSize, AdExtras } from '@ionic-native/admob' because typescript will not import the specified clases
2017-03-30 15:50:02 -04:00
Ibby Hadeed 390f474ad5 chore(): update changelog 2017-03-29 19:21:14 -04:00
Ibby Hadeed d8655f055e 3.4.3 2017-03-29 19:21:07 -04:00
Ibby Hadeed 65cf94b67b fix(app-preferences): fix bug with fetch method
closes #1299
2017-03-29 19:20:46 -04:00
Ibby Hadeed b91757e7e9 fix(secure-storage): return unfunctional SecureStorageObject if plugin doesn't exist 2017-03-29 19:15:54 -04:00
Ibby Hadeed 612cb963e1 Merge branch 'master' of github.com:driftyco/ionic-native 2017-03-29 19:11:01 -04:00
Odd Christer Brovig 8b31d72139 feat(secure-storage): add keys() and clear() methods (#1281) 2017-03-29 19:10:49 -04:00
mchristofersenrealnets 3b9e7253db docs(admob): @ionic-native (#1298)
Can't import from 'ionic-native'. need to use "@ionic-native/admob-free".
2017-03-29 19:08:54 -04:00
Ibby Hadeed 8b86a12e07 docs(native-storage): add platforms info 2017-03-29 19:02:12 -04:00
Josh Babb 543ae7abf8 docs(jins-meme): add extended usage example (#1286) 2017-03-29 18:56:35 -04:00
Ibby Hadeed 6ccf3a66bb docs(native-page-transitions): improve docs
closes #1294
2017-03-29 18:56:15 -04:00
Ibby Hadeed 2b94ffdc44 fix(admob): add missing license property
fixes #1291
2017-03-29 18:39:46 -04:00
Ibby Hadeed 208748a660 fix(push): add missing plugin decorator
closes #1297
2017-03-29 18:34:02 -04:00
perry 47b593b43d chore(docs): moving docs from /docs/v2/native to /docs/native 2017-03-29 11:19:31 -05:00
Perry Govier 947bf227d0 Running CI2 on master 2017-03-29 10:23:28 -05:00
Perry Govier 4f7718b03e Merge pull request #1289 from driftyco/cci2
chore(): use CircleCI 2
2017-03-29 10:22:41 -05:00
Ibby Hadeed 31d0f71cc9 works 100% 2017-03-28 20:32:14 -04:00
Ibby Hadeed 723ac779df test doc update 2017-03-28 20:30:41 -04:00
Ibby Hadeed ebd272e30a revert last test commit 2017-03-28 20:28:27 -04:00
Ibby Hadeed 029a196f38 test doc update 2017-03-28 20:27:35 -04:00
Ibby Hadeed b872bd01ce docs(): update docs 2017-03-28 20:26:43 -04:00
Ibby Hadeed d6711080e3 update docs on master only 2017-03-28 20:22:34 -04:00
Ibby Hadeed 3e124f1807 update docs only master 2017-03-28 20:13:44 -04:00
Ibby Hadeed e474b2987f replace cache pattern since we messed it up 2017-03-28 20:06:28 -04:00
Ibby Hadeed 75ee0418bf replace cache pattern since we messed it up 2017-03-28 20:04:03 -04:00
Ibby Hadeed 7c8c71bdc8 fix node_modules path 2017-03-28 20:02:33 -04:00
Ibby Hadeed 3d82d0d592 fix restore cache key 2017-03-28 20:01:17 -04:00
Ibby Hadeed 3f2a983c6e more caching 2017-03-28 19:59:33 -04:00
Ibby Hadeed 7953ca0e72 fixes 2017-03-28 19:46:17 -04:00
Ibby Hadeed 117b0578b0 fixes 2017-03-28 19:45:44 -04:00
Ibby Hadeed cadafaa3b6 build timeouts 2017-03-28 19:41:50 -04:00
Ibby Hadeed 4778637bd5 Remove machine option 2017-03-28 19:37:52 -04:00
Ibby Hadeed a1ff059e90 try building 2017-03-28 19:37:05 -04:00
Ibby Hadeed 15237ea983 fix syntax 2017-03-28 19:32:07 -04:00
Ibby Hadeed b0710cad1e test cci2 2017-03-28 19:31:39 -04:00
Ibby Hadeed ee269669aa 3.4.2 2017-03-28 11:23:37 -04:00
Ibby Hadeed 97307a2b8c amend(network): fix observable import 2017-03-28 09:41:12 -04:00
22 changed files with 160 additions and 72 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
#### There are no rules, but here are a few things to consider:
###### Before you submit an issue:
* Do a quick search to see if there are similar issues
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic 2, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/v2/api/platform/Platform/#ready).
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic 2, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/api/platform/Platform/#ready).
* **Check that you are using the latest version of** `ionic-native`, you can install the latest version by running `npm i --save ionic-native@latest`
###### Still having problems? submit an issue with the following details:
+23
View File
@@ -1,3 +1,26 @@
<a name="3.4.3"></a>
## [3.4.3](https://github.com/driftyco/ionic-native/compare/v3.4.2...v3.4.3) (2017-03-29)
### Bug Fixes
* **admob:** add missing license property ([2b94ffd](https://github.com/driftyco/ionic-native/commit/2b94ffd)), closes [#1291](https://github.com/driftyco/ionic-native/issues/1291)
* **app-preferences:** fix bug with fetch method ([65cf94b](https://github.com/driftyco/ionic-native/commit/65cf94b)), closes [#1299](https://github.com/driftyco/ionic-native/issues/1299)
* **push:** add missing plugin decorator ([208748a](https://github.com/driftyco/ionic-native/commit/208748a)), closes [#1297](https://github.com/driftyco/ionic-native/issues/1297)
* **secure-storage:** return unfunctional SecureStorageObject if plugin doesn't exist ([b91757e](https://github.com/driftyco/ionic-native/commit/b91757e))
### Features
* **secure-storage:** add keys() and clear() methods (#1281) ([8b31d72](https://github.com/driftyco/ionic-native/commit/8b31d72))
<a name="3.4.2"></a>
## [3.4.2](https://github.com/driftyco/ionic-native/compare/v3.4.1...v3.4.2) (2017-03-28)
<a name="3.4.1"></a>
## [3.4.1](https://github.com/driftyco/ionic-native/compare/v3.4.0...v3.4.1) (2017-03-28)
+2 -2
View File
@@ -14,11 +14,11 @@ Run following command to install Ionic Native in your project.
npm install @ionic-native/core --save
```
You also need to install the Ionic Native package for each plugin you want to add. Please see the [Ionic Native documentation](http://ionicframework.com/docs/v2/native/) for complete instructions on how to add and use the plugins.
You also need to install the Ionic Native package for each plugin you want to add. Please see the [Ionic Native documentation](http://ionicframework.com/docs/native/) for complete instructions on how to add and use the plugins.
## Documentation
For the full Ionic Native documentation, please visit [http://ionicframework.com/docs/v2/native/](http://ionicframework.com/docs/v2/native/).
For the full Ionic Native documentation, please visit [http://ionicframework.com/docs/native/](http://ionicframework.com/docs/native/).
### Basic Usage
+38 -26
View File
@@ -1,26 +1,38 @@
machine:
node:
version: 5.5.0
ruby:
version: 2.1.2
general:
branches:
only:
- master # ignore PRs and branches
dependencies:
pre:
- ./scripts/docs/prepare.sh
cache_directories:
- "~/ionic-site" # cache ionic-site
test:
override:
- echo "No tests to run"
deployment:
staging:
branch: master
commands:
- ./scripts/docs/update_docs.sh
version: 2
jobs:
build:
working_directory: ~/ionic-native/
docker:
- image: node:7
steps:
- checkout
- restore_cache:
key: ionic-site
- run:
name: Prepare ionic-site repo
command: ./scripts/docs/prepare.sh
- save_cache:
key: ionic-site
paths:
- ~/ionic-site/
- restore_cache:
key: node_modules_{{ checksum "package.json" }}
- run:
name: Install node modules
command: npm i
- save_cache:
key: node_modules_{{ checksum "package.json" }}
paths:
- ~/ionic-native/node_modules/
- run:
name: Run tslint
command: npm run lint
- add_ssh_keys
- deploy:
name: Update docs
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./scripts/docs/update_docs.sh
else
echo "We are on ${CIRCLE_BRANCH} branch, not going to update docs."
fi
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "3.4.1",
"version": "3.4.3",
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
"license": "MIT",
"devDependencies": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"sitePath": "../ionic-site",
"v2DocsDir": "docs/v2/native",
"docsDest": "../ionic-site/content/docs/v2/native",
"v2DocsDir": "docs/native",
"docsDest": "../ionic-site/content/docs/native",
"pluginDir": "dist/@ionic-native"
}
+1 -1
View File
@@ -30,7 +30,7 @@ function run {
git pull origin master
fi
git rm -rf content/docs/v2/native/*/ || true
git rm -rf content/docs/native/*/ || true
}
+2 -2
View File
@@ -19,7 +19,7 @@ module.exports = function jekyll(renderDocsProcessor) {
docs.forEach(doc => {
doc.outputPath = doc.outputPath.toLowerCase().replace(/\s/g, '-');
doc.URL = doc.outputPath.replace('docs/v2//', 'docs/v2/')
doc.URL = doc.outputPath.replace('docs//', 'docs/')
.replace('/index.md', '')
.replace('content/', '');
});
@@ -29,7 +29,7 @@ module.exports = function jekyll(renderDocsProcessor) {
docType: 'nativeMenu',
id: 'native_menu',
template: 'native_menu.template.html',
outputPath: 'content/_includes/v2_fluid/native_menu.html'
outputPath: 'content/_includes/fluid/native_menu.html'
});
return docs;
+1 -1
View File
@@ -1,5 +1,5 @@
---
layout: "v2_fluid/docs_base"
layout: "fluid/docs_base"
version: "<$ version.current.name $>"
versionHref: "<$ version.current.href.replace('content/','') $>"
path: "<$ doc.path $>"
+2 -2
View File
@@ -1,8 +1,8 @@
<li class="capitalize {% if page.id == 'overview' %}active{% endif %}">
<a href="/docs/v2/native/">Overview</a>
<a href="/docs/native/">Overview</a>
</li>
<li class="capitalize {% if page.id == 'mocking' %}active{% endif %}">
<a href="/docs/v2/native/browser.html">Browser Usage</a>
<a href="/docs/native/browser.html">Browser Usage</a>
</li>
<@- for doc in docs @><@ if doc.URL and doc.private != true and doc.beta != true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|dashify $>' %}active{% endif %}">
+1 -1
View File
@@ -20,7 +20,7 @@ $ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plug
$ npm install --save @ionic-native/<$ doc.npmId $>
```
## [Usage Documentation](https://ionicframework.com/docs/v2/native/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/')|replace('index.ts','')|replace('src/@ionic-native/plugins/','') $>)
## [Usage Documentation](https://ionicframework.com/docs/native/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/')|replace('index.ts','')|replace('src/@ionic-native/plugins/','') $>)
Plugin Repo: [<$ prop.repo $>](<$ prop.repo $>)
@@ -70,7 +70,7 @@ export interface AdMobFreeRewardVideoConfig {
*
* @usage
* ```
* import { AdMobFree, AdMobFreeBannerConfig } from 'ionic-native';
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
*
*
* constructor(private admobFree: AdMobFree) { }
+6 -1
View File
@@ -66,6 +66,11 @@ export interface AdMobOptions {
*/
adExtras?: AdExtras;
/**
* License key for the plugin
*/
license?: any;
}
export interface AdExtras {
@@ -90,7 +95,7 @@ export interface AdExtras {
* Plugin for Google Ads, including AdMob / DFP (doubleclick for publisher) and mediations to other Ad networks.
* @usage
* ```typescript
* import { AdMob, AdMobOptions, AdSize, AdExtras } from '@ionic-native/ad-mob';
* import { AdMob, AdMobOptions, AdSize, AdExtras } from '@ionic-native/admob';
*
* constructor(private admob: AdMob){}
*
@@ -37,7 +37,6 @@ export class AppPreferences {
* @return {Promise<any>} Returns a promise
*/
@Cordova({
sync: true,
callbackOrder: 'reverse'
})
fetch(dict: string, key?: string): Promise<any> { return; }
@@ -49,18 +49,17 @@ export interface IntelSecurityDataOptions {
* let storageID = 'id';
*
* this.intelSecurity.data.createFromData({ data: 'Sample Data' })
* .then((instanceID: Number) => this.IntelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
* .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((instanceID: number) => this.intelSec.data.getData(instanceID))
* .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
+12 -4
View File
@@ -17,9 +17,16 @@ declare var cordova: any;
*
* ...
*
* this.jinsMeme.setAppClientID(appClientId: string, clientSecret: string)
* .then(this.jinsMeme.startScan())
* .catch(console.log('jinsMeme.setAppClientID authentication error!'));
* this.jinsMeme.setAppClientID(appClientId: string, clientSecret: string).then(
* // Bluetooth should be enabled and the JINS MEME powered on (blinking blue light)
* this.jinsMeme.startScan().subscribe((meme_addr) => {
* this.jinsMeme.connect(meme_addr).subscribe((connectResult) => {
* this.memeService.startDataReport().subscribe((dataReport) => {
* console.log(dataReport);
* });
* });
* });
* .catch(console.log('jinsMeme.setAppClientID authentication error'));
*
* ```
*/
@@ -34,7 +41,8 @@ declare var cordova: any;
export class JinsMeme {
/**
* Authentication and authorization of App and SDK.
* Must call this method at first.
* Must call this method first.
* Sign up for an app ID (and get an app/client secret) at developers.jins.com
*
*@param {string} setAppClientID
*@param {string} clientSecret
@@ -29,21 +29,35 @@ export interface NativeTransitionOptions {
*
* ...
*
* let options: NativeTransitionOptions = {
* direction: 'up',
* duration: 500,
* slowdownfactor: 3,
* slidePixels: 20,
* iosdelay: 100,
* androiddelay: 150,
* winphonedelay: 250,
* fixedPixelsTop: 0,
* fixedPixelsBottom: 60
* };
*
* this.nativePageTransitions.slide(options)
* .then(onSuccess)
* .catch(onError);
* // example of adding a transition when a page/modal closes
* ionViewWillLeave() {
*
* let options: NativeTransitionOptions = {
* direction: 'up',
* duration: 500,
* slowdownfactor: 3,
* slidePixels: 20,
* iosdelay: 100,
* androiddelay: 150,
* fixedPixelsTop: 0,
* fixedPixelsBottom: 60
* };
*
* this.nativePageTransitions.slide(options)
* .then(onSuccess)
* .catch(onError);
*
* }
*
*
* // example of adding a transition when pushing a new page
* openPage(page: any) {
*
* this.nativePageTransitions.slide(options);
* this.navCtrl.push(page);
*
* }
*
* ```
*/
@@ -31,7 +31,8 @@ import { Cordova, Plugin } from '@ionic-native/core';
pluginName: 'NativeStorage',
plugin: 'cordova-plugin-nativestorage',
pluginRef: 'NativeStorage',
repo: 'https://github.com/TheCocoaProject/cordova-plugin-nativestorage'
repo: 'https://github.com/TheCocoaProject/cordova-plugin-nativestorage',
platforms: ['Android', 'iOS', 'Windows']
})
@Injectable()
export class NativeStorage {
+1 -1
View File
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaProperty, Plugin, CordovaCheck } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/observable/merge';
import 'rxjs/add/observable/merge';
declare var navigator: any;
+5
View File
@@ -269,6 +269,11 @@ export class Push {
/**
* @hidden
*/
@Plugin({
pluginName: 'Push',
plugin: 'phonegap-plugin-push',
pluginRef: 'PushNotification'
})
export class PushObject {
private _objectInstance: any;
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CordovaInstance, Plugin, CordovaCheck } from '@ionic-native/core';
import { CordovaInstance, Plugin, checkAvailability } from '@ionic-native/core';
declare var cordova: any;
@@ -8,7 +8,7 @@ declare var cordova: any;
*/
export class SecureStorageObject {
constructor(private _objectInstance: any) {}
constructor(private _objectInstance?: any) {}
/**
* Gets a stored item
@@ -41,6 +41,24 @@ export class SecureStorageObject {
})
remove(reference: string): Promise<any> { return; }
/**
* Get all references from the storage.
* @returns {Promise<any>}
*/
@CordovaInstance({
callbackOrder: 'reverse'
})
keys(): Promise<any> { return; }
/**
* Clear all references from the storage.
* @returns {Promise<any>}
*/
@CordovaInstance({
callbackOrder: 'reverse'
})
clear(): Promise<any> { return; }
}
/**
@@ -102,10 +120,13 @@ export class SecureStorage {
* @param store {string}
* @returns {Promise<SecureStorageObject>}
*/
@CordovaCheck()
create(store: string): Promise<SecureStorageObject> {
return new Promise((res, rej) => {
const instance = new cordova.plugins.SecureStorage(() => res(new SecureStorageObject(instance)), rej, store);
if (checkAvailability('cordova.plugins.SecureStorage', null, 'SecureStorage') === true) {
const instance = new cordova.plugins.SecureStorage(() => res(new SecureStorageObject(instance)), rej, store);
} else {
res(new SecureStorageObject());
}
});
}
@@ -19,10 +19,11 @@ declare var window;
*
* ...
*
* // let status bar overlay webview
* this.statusBar.overlaysWebView(true);
*
* this.statusBar.overlaysWebView(true); // let status bar overlay webview
*
* this.statusBar.backgroundColorByHexString('#ffffff'); // set status bar to white
* // set status bar to white
* this.statusBar.backgroundColorByHexString('#ffffff');
* ```
*
*/