> mui.plusReady(function() {
if ( plus.os.name == "iOS" ) {
console.log('this is ios');
var LAContext = plus.ios.importClass("LAContext");
var NSError = plus.ios.importClass("NSError");
var nserror = new NSError();
var lac = new LAContext();
var canUse = lac.canEvaluatePolicyerror(
"LAPolicyDeviceOwnerAuthenticationWithBiometrics"
,&nserror
);
lac.evaluatePolicylocalizedReasonreply(
"LAPolicyDeviceOwnerAuthenticationWithBiometrics","请按手指",function(success,error){
console.log(success);
console.log(error);
}
)
} else {
}
});
这段代码不能执行,
控制台如下输出
[LOG] : this is ios
[LOG] : sf:__exec-Invocation
[LOG] :
[LOG] : sf:syncExecMethod-UI
[LOG] : sf:syncExecMethod-UI
[ERROR] : TypeError: undefined is not an object (evaluating 'c.length')
file name:index.html
line no:3
DCloud_IOS_XTY
需要离线打包添加识别框架,5+runtime默认不包含库
2016-07-06 13:01
YIRIUS (作者)
回复 DCloud_IOS_XTY:nativejs无法完成是吧。我这是直接写的ios语句
2016-07-06 14:23
DCloud_IOS_XTY
5+runtime必须要包含该库才可以使用NJS调用,只能离线打包自己添加
2016-07-06 15:04