Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
109 stars 139 forks source link

PushWoosh_LogLevel won't keep the debug level #216

Closed rwillett closed 7 years ago

rwillett commented 7 years ago

Hi,

Since we upgraded from PushWoosh 4.2.2 to PushWoosh 6.2.6, we've noticed that the debug flag

Pushwoosh_LOG_LEVEL

won't keep the state we set it at it for iOS.

e.g.

We set the flag screen shot 2016-10-27 at 06 38 13

We do a command line build

cordova build ios

and without updating anything else in the project, indeed just leaving the .plist open it gets changed to undefined

screen shot 2016-10-27 at 06 39 39 Whilst this is not the worlds greatest bug, it's a pain having to change it when theres no need to.

Thanks

Rob

DimanAM commented 7 years ago

This is related to this problem https://github.com/Pushwoosh/pushwoosh-phonegap-plugin/issues/203. cordova plugin add pushwoosh-cordova-plugin --save will set all unspecified preferences to undefined not the default values from plugin.xml.

As a workaround you can set LOG_LEVEL explicitly: cordova plugin add pushwoosh-cordova-plugin --variable LOG_LEVEL="NONE" --save

Or you can modify config.xml manually after adding plugin.

rwillett commented 7 years ago

Thank for this.

We've just tried setting config.xml with

  <plugin name="pushwoosh-cordova-plugin" spec="~6.2.6">
    <variable name="LOG_LEVEL" value="NONE" />
    <variable name="IOS_FOREGROUND_ALERT_TYPE" value="undefined" />
    <variable name="ANDROID_FOREGROUND_PUSH" value="undefined" />
  </plugin>

and it doesn't seem to work. Is this just for PhoneGap builds?

Rob

DimanAM commented 7 years ago

Have you tried to readd ios platform (and all plugins) after that?

rwillett commented 7 years ago

I'm sorry, but we don't understand what you mean.

Do you mean reinstall the plugin with the variable flag set?

cordova plugin add pushwoosh-cordova-plugin --save

Rob

DimanAM commented 7 years ago

We've just tried setting config.xml with

 <plugin name="pushwoosh-cordova-plugin" spec="~6.2.6">
   <variable name="LOG_LEVEL" value="NONE" />
   <variable name="IOS_FOREGROUND_ALERT_TYPE" value="undefined" />
   <variable name="ANDROID_FOREGROUND_PUSH" value="undefined" />
 </plugin>

and it doesn't seem to work.

Try removing plugins and platforms directories and run cordova platform add ios.

rwillett commented 7 years ago

OK, removing platforms and reinstalling platforms and plugins seems to make the LOG Level stick

Thanks

Rob