4

After updating iPad to iPadOS 15 when receiving Rate and Review Dialog and pressing Cancel on it, app freezes. This is reproducing on real iPads and iPad simulators. This is even reproducible with a build made with Xcode 12 and installed on iPadOS 15.

I'm using this code to show this pop up:

if #available(iOS 14.0, *) {
      if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene {
            SKStoreReviewController.requestReview(in: scene)
            }
}
else {
     SKStoreReviewController.requestReview()
}

I checked running any code in DispatchQueue.main.asyncAfter and it works, so looks like the app doesn't react only on user's touches. I think maybe it's left any kind of overlay over all the app.

Does anybody have any ideas on how to solve this?

Maxvale
  • 145
  • 6
  • I had a similar issue and it got fixed when I tried using live config. Try to run the app on live config and check if you are having live bundle identifier. – Thahir Mar 22 '22 at 13:08

1 Answers1

2

Finally, I found the Secret:

  1. Check if you use CocoaDebug.
  2. Check if you override the canBecomeFirstResponder method.

if you use CocoaDebug, you can see this override code is in CocoaDebug+Extensions.swift:

open override var canBecomeFirstResponder: Bool { 
    return true 
}

And when requestReview for Apple in iOS 15+, like this:

if (@available(iOS 14.0, *)) {
    UIWindowScene *activeScene;
    NSSet<UIScene *> *scenes = [[UIApplication sharedApplication] connectedScenes];
    for (UIScene *scene in scenes) {
        if ([scene activationState] == UISceneActivationStateForegroundActive) {
            activeScene = (UIWindowScene *)scene;
            break;
        }
    }
    if (activeScene != nil) {
      [SKStoreReviewController requestReviewInScene:activeScene];
    }
} else if (@available(iOS 10.3, *)) {
    [SKStoreReviewController requestReview];
}

For iOS 15+, App can perceive the user's interaction on the Review View and make its window (SkstoreReViewPresentationWindow) keyWindow, while App is not perceived before iOS 15.

So in iOS 15.0+, after Clicking on the Review View, the override code in CocoaDebug would make its Window the FIRST responder after becoming the keyWindow.

That causes the windows below never be a responder, so the screen freezes, because the size of SkstoreReViewPresentationWindow is FULL screen.


You can also follow the issue in CocoaDebug Github: https://github.com/CocoaDebug/CocoaDebug/issues/143

DoubleLLL
  • 21
  • 2