tkyaji / cordova-plugin-crypt-file

This plugin to encrypt the source files.
Apache License 2.0
178 stars 116 forks source link

Using ionic.Platform.ready to get device uuid doesn't run after installing the cordova-plugin-crypt-file plugin #16

Closed shariajoe closed 7 years ago

shariajoe commented 8 years ago

I have been trying to obtain my device uuid for some 2 days now still cant find away through, The code works fine without the plugin and i get the uuid, but once i install it simply doesnt show. I have isolated the problem to this function ionic.Platform.ready() as it is not executed.Kindly help out solve this issue.

Here is the sample code:

.run(function($ionicPlatform, $localstorage) {  
    $ionicPlatform.ready(function() {
        if (window.cordova && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        }
        if (window.StatusBar) {
            StatusBar.styleDefault();
        }
        var device = ionic.Platform.device();
        $localstorage.set('deviceIDs', device.uuid);  
    })  ;
})
zean00 commented 8 years ago

If you are using this plugin in android with other cordova plugin, it won't work out of the box. You might want to check similar issue for the workaround https://github.com/tkyaji/cordova-plugin-crypt-file/issues/12