UNPKG

@mastergui/in-app-review

Version:
23 lines 791 B
import { Device } from '@nativescript/core/platform'; import { InAppReviewCommon } from './common'; export class InAppReview extends InAppReviewCommon { static init() { console.log('>> No need to run init on iOS! :-)'); } static showReviewDialog() { console.log('>> Starting review flow...'); try { let iosVersion = +Device.osVersion; if (iosVersion > 13) { SKStoreReviewController.requestReviewInScene(UIApplication.sharedApplication.keyWindow.rootViewController.view.window.windowScene); } else { SKStoreReviewController.requestReview(); } } catch (error) { console.log(error); } } } //# sourceMappingURL=index.ios.js.map