Closed prescindivel closed 4 years ago
I changed the import path to import { SmsRetriever } from '@ionic-native/sms-retriever/ngx';
and it worked, but now I get another error:
when I invoke this.smsRetriever.startWatching()
Uncaught (in promise): TypeError: Object(...) is not a function
Seems you haven’t installed the plugin or may not installed properly. You can install the plugin and node module using below commands:
ionic cordova plugin add cordova-plugin-sms-retriever-manager@latest
npm install @ionic-native/sms-retriever
and make sure you are calling plugin method are device ready.
and Thanks for the know to change the import path to import { SmsRetriever } from '@ionic-native/sms-retriever/ngx';
I have changed in the documentation.
Thanks!
Thanks for helping!
This is still happening to me, after doing this https://github.com/hanatharesh2712/ionic-native-sms-retriever-plugin-master/issues/9#issuecomment-524196891
I have tried everything: deleting node_modules, plugins and platforms, and alyaws the same:
TypeError: Object(...) is not a function
at SmsRetriever.getAppHash (vendor.js:107565)
...
@guillem-sopra Can you share your ionic info? and installed plugins list
@guillem-sopra You find working demo here: https://github.com/hanatharesh2712/sms-plugin-test
Thanks a lot @hanatharesh2712 but that is Ionic 4 right? Do you have by any chance any working example with Ionic 3 and TS?
@guillem-sopra You find working demo for Ionic 3 here: https://github.com/hanatharesh2712/sms-plugin-test-ionic-3
See this file: https://github.com/hanatharesh2712/ionic-native-sms-retriever-plugin-master/issues/11#issuecomment-568655748
Thanks man. I see that it works, I'm going to try to implement this on my project
I'm getting the following error:
'SmsRetriever' refers to a value, but is being used as a type here.
My component: