Skip to content

Commit

Permalink
Support for ionic 2+
Browse files Browse the repository at this point in the history
  • Loading branch information
omaxlive committed Apr 26, 2018
1 parent eb4a746 commit d106a44
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inappreview.requestReview(success, failure);
```

More detailed example:
```
```javascript
var requestReview = function(){
try{
var success = function() {
Expand All @@ -48,6 +48,42 @@ var requestReview = function(){
};
```

## Usage in ionic 2+

#### Install the Ionic Native package of this plugin
npm install @ionic-native/in-app-review --save

#### After installing a plugin’s package, add it to your app’s NgModule.


```typescript

import { InAppReview } from '@ionic-native/in-app-review';

@NgModule({

providers: [
InAppReview
]

})
export class AppModule { }
```

#### The use it in your page. Example:
```typescript
import { InAppReview } from '@ionic-native/in-app-review';


constructor(private inAppReview: InAppReview) { }

this.inAppReview.requestReview()
.then((res: any) => console.log(res))
.catch((error: any) => console.error(error));

```


## More information about the use of in app review
Apple is also limiting the amount of times developers can ask customers for reviews. Developers will only be able to bring up the review dialog three times a year. If a customer has rated the app, they will not be prompted again. If a customer has dismissed the review prompt three times, they will not be asked to review the app for another year.
More: http://www.loopinsight.com/2017/01/24/apple-explains-the-new-app-reviews-api-for-developers/
Expand Down

0 comments on commit d106a44

Please sign in to comment.