commit | 987f407f2e293f9737f5c9c30a045308fa0590ae | [log] [tgz] |
---|---|---|
author | Eugene But <eugenebut@google.com> | Mon Dec 02 23:35:42 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Dec 02 23:35:42 2019 |
tree | a9bba88fe598e8de153767b53323aecd78e725aa | |
parent | 249eb129ec358b78fa48bd809ed014aa91ea6005 [diff] |
Fix SKStoreProductViewController dismissal in StoreKitCoordinator. Do not call -dismissViewControllerAnimated:completion: on |self.baseViewController|, since the receiver of the method can be dismissed if there is no presented view controller. On iOS 12 SKStoreProductViewControllerDelegate is responsible for dismissing SKStoreProductViewController. On iOS 13.0 OS dismisses SKStoreProductViewController after calling -productViewControllerDidFinish: On iOS 13.2 OS dismisses SKStoreProductViewController before calling -productViewControllerDidFinish: Calling -dismissViewControllerAnimated:completion: on |self.baseViewController| on iOS 13.2 will dismiss base view controller and break the application UI. According to SKStoreProductViewController documentation the delegate is responsible for calling deprecated dismissModalViewControllerAnimated: so the documentation is clearly outdated and this code should be resilient to different SKStoreProductViewController behavior without relying on iOS version check (see crbug.com/1027058). Bug: 1027058 Change-Id: Ib3918930b9950e79b088f14b3d0424e42d7b5c58 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1928590 Commit-Queue: Eugene But <eugenebut@chromium.org> Reviewed-by: Mohammad Refaat <mrefaat@chromium.org> Reviewed-by: edchin <edchin@chromium.org> Auto-Submit: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#720711}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .