Skip to content

mattlewis92/cordova-plugin-is-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-is-debug

A cordova plugin to 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. Common use cases include:

  • using a different API endpoint for development
  • using a different push notification certificate for development and production

Install

cordova plugin add cordova-plugin-is-debug

Usage

cordova.plugins.IsDebug.getIsDebug(function(isDebug) {
    console.log('Is debug:', isDebug);
}, function(err) {
    console.error(err);
});

Supported platforms

  • iOS
  • Android

Caveats

iOS - you will need to make sure the DEBUG flag is set in xcode for your development builds. Most of the time this should be automatic but sometimes you may need to configure it in xcode

Credits

License

MIT

About

A cordova plugin to detect if the app is running in debug mode or not

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published