From c6713862c596dac5f32b10eef08a6192882ff3ad Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Sun, 29 Jul 2018 09:10:48 +0200 Subject: [PATCH] refactor: Improve Ionic Native warnings (#2611) - Explicitly spell out that this is coming from "Ionic Native", instead of just "Native" - Improve sentence that explains 2 most common reasons for missing Cordova --- src/@ionic-native/core/util.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/@ionic-native/core/util.ts b/src/@ionic-native/core/util.ts index 835771d7f..7a8d950c9 100644 --- a/src/@ionic-native/core/util.ts +++ b/src/@ionic-native/core/util.ts @@ -53,7 +53,7 @@ export const pluginWarn = ( ): void => { if (method) { console.warn( - 'Native: tried calling ' + + 'Ionic Native: tried calling ' + pluginName + '.' + method + @@ -63,12 +63,12 @@ export const pluginWarn = ( ); } else { console.warn( - `'Native: tried accessing the ${pluginName} plugin but it's not installed.` + `'Ionic Native: tried accessing the ${pluginName} plugin but it's not installed.` ); } if (plugin) { console.warn( - `Install the ${pluginName} plugin: 'ionic cordova plugin add ${plugin}'` + `Install the ${pluginName} plugin: 'ionic cordova plugin add ${plugin}'` ); } }; @@ -81,17 +81,17 @@ export const pluginWarn = ( export const cordovaWarn = (pluginName: string, method?: string): void => { if (method) { console.warn( - 'Native: tried calling ' + + 'Ionic Native: tried calling ' + pluginName + '.' + method + - ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator' + ', but Cordova is not available. Make sure to a) run in a real device or simulator and b) include cordova.js in your index.html' ); } else { console.warn( 'Native: tried accessing the ' + pluginName + - ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator' + ' plugin but Cordova is not available. Make sure to a) run in a real device or simulator and b) include cordova.js in your index.html' ); } };