AppRate plugin not found after installation

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?

ionic -v 6.10.1

@capacitor/ios”: “^2.2.0”
@ionic-native/app-rate”: “^5.33.1”,
“cordova-plugin-apprate”: “^1.7.2”,

How are you testing this? are you just running ionic serve or are you doing a build and deploying to a device?

Hi Mike, this is in the iOS simulator. Hence I am puzzled why. I have successfully installed all my other plugins with the standard commands.

    "@ionic-native/firebase-analytics": "^5.31.1",
    "@ionic-native/firebase-messaging": "^5.30.0",
    "@ionic-native/geolocation": "^5.31.1",
    "@ionic-native/in-app-browser": "^5.33.1",
    "@ionic-native/social-sharing": "^5.31.1",
    "@ionic-native/splash-screen": "^5.31.1",
    "@ionic-native/status-bar": "^5.31.1",
    "@ionic-native/youtube-video-player": "^5.31.1",

but this one is acting up. Extremely thankful for any suggestions… :slight_smile:

can you share a demo/example project? I dont need/want your actual project, just a small reproduction or test.

I’ll try, will ping you when it’s up.

For anyone coming here from Google:

The installation guide (App Rate - Ionic Documentation) has

this.appRate.preferences.storeAppURL = {
  ios: '<app_id>',
  android: 'market://details?id=<package_name>',
  windows: 'ms-windows-store://review/?ProductId=<store_id>'
}

But you will see the above error unless you do it through the setter instead, like so:

this.appRate.setPreferences({
      usesUntilPrompt: 3,
      storeAppURL: {
        ios: '<app_id>',
        android: 'market://details?id=<package_name>',
        windows: 'ms-windows-store://review/?ProductId=<store_id>'
      }
    })