Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@ionic-native/app-rate does not support all preferences in cordova-plugin-apprate #2154

Closed
sredeker opened this issue Nov 28, 2017 · 0 comments · Fixed by #2155
Closed

@ionic-native/app-rate does not support all preferences in cordova-plugin-apprate #2154

sredeker opened this issue Nov 28, 2017 · 0 comments · Fixed by #2155

Comments

@sredeker
Copy link
Contributor

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/

Current behavior:
@ionic-native/app-rate does not support all preferences provided by https://github.com/pushandplay/cordova-plugin-apprate. Specifically, the simpleMode preference is not supported by the Ionic plugin leading to unexpected behavior on Android devices. The Cordova plugin defaults simpleMode to false which presents the user with an additional prompt. If yesButtonLabel, noButtonLabel are not configured, this results in a prompt with null values image
image

SimpleMode allows you bypass this 1st prompt, only requiring configuration for the original AppRate prompt.
image

Any attempt to set this property results in the following typescript compiling error:

Type '{ openStoreInApp: true; simpleMode: boolean; storeAppURL: { ios: any; android: any; }; customLoca...' 
            is not assignable to type 'AppRatePreferences'. Object literal may only specify known properties, and 
            'simpleMode' does not exist in type 'AppRatePreferences'.

Expected behavior:
It is expected that the Ionic plugin provide the same preferences as the Cordova plugin so it can properly be used.

Related code:

this.appRate.preferences = {
      simpleMode: true,
      ...
}

Other information:
https://github.com/pushandplay/cordova-plugin-apprate#options--preferences

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

cli packages: (/Users/sredek/.nvm/versions/node/v8.2.1/lib/node_modules)

    @ionic/cli-utils  : 1.8.0
    ionic (Ionic CLI) : 3.8.0

global packages:

    Cordova CLI : 6.5.0 

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : android 6.2.2 ios 4.5.3
    Ionic Framework    : ionic-angular 3.8.0

System:

    ios-deploy : 1.9.2 
    ios-sim    : 6.0.0 
    Node       : v8.2.1
    npm        : 5.3.0 
    OS         : macOS Sierra
    Xcode      : Xcode 9.1 Build version 9B55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant