Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SKStoreReviewController requestReview not working on iOS 14

Tags:

ios

storekit

I've implemented the native review prompt using this code

if (@available(iOS 10.3, *)) {
  [SKStoreReviewController requestReview];
  resolve(@YES);
}

But it's not showing in debug on a real iPhone X on iOS 14.4. I'm seeing this error in the device's log (in the general console not Xcode):

No "UIViewServicePermittedViewControllerClasses" array in View Service bundle "com.apple.ios.StoreKitUIService"'s Info.plist. Cannot check validity of request for class "ServiceReviewViewController". This will become failure in a future build.

enter image description here

It's showing perfectly fine on an iPhone 6 on iOS 12.5. (the Submit button is greyed out).

I noticed that requestReview is deprecated since iOS 14 so I tried to use the new method passing a Scene:

if (@available(iOS 14.0, *)) {
  [SKStoreReviewController requestReviewInScene:[UIApplication.sharedApplication.connectedScenes allObjects][0]];
} else if (@available(iOS 10.3, *)) {
  [SKStoreReviewController requestReview];
}

With the exact same error in the device's logs. I made sure that [UIApplication.sharedApplication.connectedScenes allObjects][0] was not nil.

Has anyone seen this issue before?

like image 962
Simon Reggiani Avatar asked Sep 19 '25 08:09

Simon Reggiani


1 Answers

After a couple of days of investigation, we finally found that the review prompt is showing if we remove a modal window we're showing as a splash screen while some resources are loaded.

That seems to be tripping Storekit's logic to show the prompt on the visible window.

UPDATE

Seems like the culprit was this particular line:

window.windowLevel = modalWindow.windowLevel + 1
like image 77
Simon Reggiani Avatar answered Sep 22 '25 01:09

Simon Reggiani