Daniel Sogl c6f9fa356f style(): unify docs and spacing (#1448)
* typo(barcode-scanner): fixe circle lint error

* typo(docs):  Unified the documentations

In some plugins the typescript markup was missing.
I also unified the console.log string from console.log("hello") to console.log('Hello') so any plugin page look the same.
2017-04-30 14:36:22 -04:00

44 lines
1.4 KiB
TypeScript

import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Is Debug
* @description
* Detect if the app is running in debug mode or not.
* Debug mode is when the app is built and installed locally via xcode / eclipse / the cordova cli etc, compared to release mode when the app was downloaded from the app / play store via an end user.
*
* @usage
* ```typescript
* import { IsDebug } from '@ionic-native/is-debug';
*
* constructor(private isDebug: IsDebug) { }
*
* ...
*
* this.isDebug.getIsDebug()
* .then((isDebug: boolean) => console.log('Is debug:', isDebug))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'IsDebug',
plugin: 'cordova-plugin-is-debug',
pluginRef: 'cordova.plugins.IsDebug',
repo: 'https://github.com/mattlewis92/cordova-plugin-is-debug',
platforms: ['Android', 'iOS']
})
@Injectable()
export class IsDebug extends IonicNativePlugin {
/**
* Determine if an app was installed via xcode / eclipse / the ionic CLI etc
* @returns {Promise<boolean>} Returns a promise that resolves with true if the app was installed via xcode / eclipse / the ionic CLI etc. It will resolve to false if the app was downloaded from the app / play store by the end user.
*/
@Cordova()
getIsDebug(): Promise<boolean> {
return;
}
}