britannio / in_app_review

A Flutter plugin for showing the In-App Review/System Rating pop up on Android, IOS, and MacOS. It makes it easy for users to rate your app.
306 stars 78 forks source link

[iOS16] Warning when request App Review on landscape mode #70

Open soarescaique opened 1 year ago

soarescaique commented 1 year ago

When opening a native iOS dialog, it will try to open it on portrait mode, but the screen orientation is on landscape mode. It seems like a conflict between orientations will happen. I have never gotten this warning before ( iOS16 lower versions)

Steps to reproduce:(physical device) 1 - Change the orientation of the app. -> SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); 2 - Then request an app review for your app -> InAppReview.instance.requestReview(); 3 - The warning below will be shown.

[Assert] A new orientation transaction token is being requested while a valid one already exists. reason=Fullscreen transition (presenting): fromVC=<UIApplicationRotationFollowingController: 0x11b668f50>; toVC=<SKStoreReviewViewController: 0x11b5cd900>;; windowOrientation=portrait; sceneOrientation=landscapeLeft; existingTransaction=<_UIForcedOrientationTransactionToken: 0x283ee6340; state: committing; originalOrientation: landscapeLeft (4)>

Code example:

@override
  void initState() {
    SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); 
    InAppReview.instance.requestReview();
    super.initState();
  }