cordova Uncaught TypeError:无法读取undefined的属性'verifyPhoneNumber'
问题描述:
我开发了cordova mobile app。我们发送otp到电话号码。所以我们使用firebase插件发送otp,并通过这个指导fcm plugin。cordova Uncaught TypeError:无法读取undefined的属性'verifyPhoneNumber'
我安装这个插件
科尔多瓦插件添加[email protected] --save
我有这样的错误
遗漏的类型错误:无法读取属性 'verifyPhoneNumber' 的未定义
window.FirebasePlugin.verifyPhoneNumber("+91*********", timeOutDuration, function(credential) {
console.log(credential);
console.log('successfully login with phone no');
alert('successfully login')
}, function(error) {
console.error(error);
alert(error)
});
答
来自:https://javebratt.com/firebase-phone-authentication/
Jorge Vergara Mod Ankit Maheshwari•3个月前
如果您使用的是要添加官方插件的名称,并且没有该功能,您需要从回购中添加该插件。 https://github.com/jestcastro/cordova-plugin-firebase