Ionic App Availability plugin getting Error Object (…) is not a function

天涯浪子 提交于 2019-12-11 05:22:25

问题


I am trying to implement App Availability Feature in ionic. I have an app installed in my device and trying to check if that app exists from another app. But facing an issue in the same, getting the below error


回答1:


Possibly you are facing mismatch of ionic version of app and the plugin version you installed in your app. In Ionic V3 you no need to import from '../ngx';

Ionic V3 and V4 have Different plugin url

Ionic v3 plugins

Ionic v4 plugins.

For Ionic v3 App availability

 ionic cordova plugin add cordova-plugin-appavailability
 npm install --save @ionic-native/app-availability@4

And for Ionic V4 App availability

ionic cordova plugin add cordova-plugin-appavailability
npm install @ionic-native/app-availability

npm install cmd is different for both version

Try this steps

  1. remove plugin
  2. Add plugin for ionic V3 compatible from here
  3. Try to build now


来源:https://stackoverflow.com/questions/55139399/ionic-app-availability-plugin-getting-error-object-is-not-a-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!