Ionic5 Capacitor Apprate Does Not Install

I am trying to include AppRate in my app following the instructions

npm install cordova-plugin-apprate
npm install @ionic-native/app-rate
ionic cap sync

but I get

⚡️  [warn] - Native: tried calling AppRate.preferences, but the AppRate plugin is not installed.
⚡️  [warn] - Install the AppRate plugin: 'ionic cordova plugin add cordova-plugin-apprate'

when calling AppRate.

The package is in the iOS project path

ll ios/capacitor-cordova-ios-plugins/sources/CordovaPluginApprate/
total 16
-rw-r--r--  1 me  staff   1.2K Jun 27 09:00 CDVAppRate.h
-rw-r--r--  1 me  staff   3.8K Jun 27 09:00 CDVAppRate.m

Usually the nearly identical instructions how to install native plugins would work. This is the first that they are

Here's how I call it in my code

import { AppRate } from '@ionic-native/app-rate/ngx';
...
providers: [AppRate],
...

    showAppRate(){
      this.appRate.preferences.storeAppURL = {
        ios: 'ID',
        android: 'LINK'
      };

      this.appRate.promptForRating(true);
    }

Not doing anything different... Is it missing in the build process somehow? How could I check that?

2
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article