Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIAlertController forces orientation change to portrait, since 3.9.1 #9

Closed
levochkaa opened this issue Sep 17, 2024 · 2 comments
Closed

Comments

@levochkaa
Copy link

After updating CAS version from 3.9.0 to 3.9.1 (we are using Optimal), all alerts started to force orientation change to portrait.

dJVmdTTa.mp4

And if the orientation is locked to landscape (what we have in production currently), the app crashes.

*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [SwiftUI.PlatformAlertController shouldAutorotate] is returning YES'

It seems to get fixed after subclassing UIAlertController and adding a call to setNeedsUpdateOfSupportedInterfaceOrientations

override func viewDidLoad() {
    super.viewDidLoad()
    if #available(iOS 16, *) {
        setNeedsUpdateOfSupportedInterfaceOrientations()
    }
}

...but we have SwiftUI alerts..

After some investigation I've found, that the issue is probably in CASExchange adapter, because adding all Optimal adapters without it makes the bug disappear and vice-versa (adding only CASExchange brings the bug).

The same bug appears in CAS version 3.9.3

@Str4tos
Copy link
Member

Str4tos commented Sep 20, 2024

Hello @levochkaa,
Thank you for reporting this issue. We are currently investigating to determine the root cause. We appreciate your patience and will update you as soon as we have more information.

@Str4tos
Copy link
Member

Str4tos commented Sep 23, 2024

Thanks for your patience.

This issue will be fixed in our next release 3.9.4.

@Str4tos Str4tos closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants