mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-19 10:27:10 +08:00

* style(canva-camera): fix angular style * style(crop): fix angular style * style(file-chooser): fix angular style * style(file-opener): fix angular style * style(file): fix angular style * style(inappbrowser): fix angular style * style(instagram): fix angular style * style(is-debug): fix angular style * style(native-page-transitions): fix angular style * style(market): fix angular style * style(music-controls): fix angular style * style(nfc): fix angular style * style(pay-pal): fix angular style * style(power-management): fix angular style * style(securestorage): fix angular style * style(streaming-media): fix angular style * style(video-editor): fix angular style * style(youtube-video-player): fix angular style
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { Plugin, Cordova } from './plugin';
|
|
|
|
/**
|
|
* @name IsDebug
|
|
* @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
|
|
* ```
|
|
* import {IsDebug} from 'ionic-native';
|
|
*
|
|
* IsDebug.getIsDebug()
|
|
* .then((isDebug: boolean) => console.log('Is debug:', isDebug))
|
|
* .catch((error: any) => console.error(error));
|
|
*
|
|
* ```
|
|
*/
|
|
@Plugin({
|
|
plugin: 'cordova-plugin-is-debug',
|
|
pluginRef: 'cordova.plugins.IsDebug',
|
|
repo: 'https://github.com/mattlewis92/cordova-plugin-is-debug'
|
|
})
|
|
export class IsDebug {
|
|
|
|
/**
|
|
* Determine if an app was installed via xcode / eclipse / the ionic CLI etc
|
|
* @return {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()
|
|
static getIsDebug(): Promise<boolean> {
|
|
return;
|
|
}
|
|
|
|
}
|