Maray97
Maray97

Reputation: 172

SKStoreReviewController.requestReview() not working on iOS 14

as I say in the title, the

[SKStoreReviewController requestReview];

is not working anymore in iOS 14. Does anyone know the alternative?

Upvotes: 1

Views: 3644

Answers (2)

Kap
Kap

Reputation: 1

Thanks. It works for me with cordova plugin.

if (@available(iOS 14.0, *)) {
    [SKStoreReviewController requestReviewInScene:self.viewController.view.window.windowScene];
} else if (@available(iOS 10.3, *)){
    [SKStoreReviewController requestReview];
}

Upvotes: 0

David Pasztor
David Pasztor

Reputation: 54716

The iOS14+ version of the requestReview function is requestReviewInScene:. See its docs.

If you need to support both the old and new version of the function, you can use if (@available(iOS ...) checks (code written by @Maray97):

if (@available(iOS 14.0, *)) { 
    [SKStoreReviewController requestReviewInScene:self.view.window.windowScene]; 
} else if (@available(iOS 10.3, *)) { 
    [SKStoreReviewController requestReview]; 
} 

Upvotes: 8

Related Questions