我正在尝试初始化安全存储插件.当此失败时,表示用户没有安全的锁屏设置.使用github页面我正在尝试重新创建提供的示例:
var ss;
var _init = function () {
ss = new cordova.plugins.SecureStorage(
function () {
console.log('OK');
},
function () {
navigator.notification.alert(
'Please enable the screen lock on your device. This app cannot operate securely without it.',
function () {
ss.secureDevice(
function () {
_init();
},
function () {
_init();
}
);
},
'Screen lock is disabled'
);
},
'my_app');
};
_init();
Run Code Online (Sandbox Code Playgroud)
这是我的尝试:
private createSecureStorage() {
this.secureStorageAPI.create(this.storeName).then(
(storage: SecureStorageObject) => {
this.secureStorage = storage;
}).catch(
(error) => {
this.dialogs.alert( 'Please …
Run Code Online (Sandbox Code Playgroud)