This is a migrated thread and some comments may be shown as answers.

Verified AppVersion Plugin Exception after AppBuilder 3.2 Upgrade

1 Answer 49 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brandon Peterson
Top achievements
Rank 2
Brandon Peterson asked on 13 Apr 2016, 07:24 PM

After the upgrade, the AppVersion Plugin (0.1.7; installed from verified plugin marketplace) started throwing the following exception:

cordova.getAppVersion.getVersionNumber is not a function

My code:

if (cordova.getAppVersion) {
     try {
          cordova.getAppVersion.getVersionNumber(function (v) {
               if (!v) {
                    version = defaultValue;
                    $log.error('No app version returned.');
               }
               else {
                    version = v;
               }
          });
 
     } catch (e) {
          version = defaultValue;
          $log.error('Error retreiving version.', e.message);
     }
}
else {
     version = defaultValue;
     $log.warn('No app version plugin.');
}

(For clarity, referring to this plugin)

https://github.com/Telerik-Verified-Plugins/AppVersion

Appears to be an issue in the simulator (and pretty sure on iOS - still testing).

Can anyone else confirm?

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 18 Apr 2016, 09:55 AM
Hi Brandon,

I loaded the AppVersion demo app in Telerik Platform to test how the plugin can be used in the simulator, the companion app and also installing the built .ipa file on a iPhone with iOS 9.1. 
Below you can find my observations:
1. This plugin is actually not supported in the simulator. There are some limitations you should keep in mind when working with custom plugins in the simulator or the companion app, for example most verified/custom plugins are actually not supported there. All details on the supported plugins are listed in the articles on:
Limitations of the Device Simulator.
2. It worked fine in the Companion app and not error was raised.
3. It worked fine when run on the device and not error was raised.

Would you please confirm if you get the error on the same demo? If so, then would you please share details on the exact setup you have so that I can verify the same on my end?

Regards,
Dimitrina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Report a bug
Asked by
Brandon Peterson
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Share this question
or