[App Version Plugin] AppVersion is not defined or Can't find variable: AppVersion

[App Version Plugin] AppVersion is not defined or Can't find variable: AppVersion

  
Forge Component
(4)
Published on 16 Oct by David Cruz
4 votes
Published on 16 Oct by David Cruz

Dear 

We are receiving below errors 

1) AppVersion is not defined

2) Can't find variable: AppVersion


In AppVersionPlugin --> CheckAppVersionPlugin method -->PluginIsLoaded java script .

Kindly let us know how to fix this.


Thanks and Regards

Rajashekar Reddy Ette


 

Hi Rajashekar,

Sorry for the answer delay, but I was out for a couple of weeks without any access to a computer, so only now did I see the post.

A couple of questions so that I can understand a little better the issue. 

Did you build a new native application (Android or Iphone) after adding the plugin to your app ? Also do you have the common plugin module referenced on ypur application ? Normally if you add any new cordova plugin, the app needs to be rebuilt again.

Also are you having the issue with Android and/or Iphone ?

I can change the code to validate the existence of the AppVersion var, and avoid the error but unfortunately, then we can't get version number of the app. If the var is not available, that indicates that the cordova plugin failed to load or something.

If you want you can upload your app (omp) (or a sample one where you have this error) so that I can take a look and see if I can help.

Thanks

Hi Rajashekar,

I've just uploaded a new version of the plugin, which does a more fail safe validation on the existence of the AppVersion var that contains the version number. This should mitigate the errors that you encountered.

Let me know if the new version worked.

Thanks