Search code examples
iosobjective-cstorekitios14

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?


Solution

  • 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]; 
    }