-
Notifications
You must be signed in to change notification settings - Fork 429
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
Orientation incorrectly reported as portrait #410
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In some cases when the orientation is neither landscape nor portrait, the reported orientation from
orientation
is.portrait
. The orientation can be neither in some cases such as during Xcode previews after a reload when the device is already in landscape, though that also seems like a bug in Xcode previews reporting the wrong orientation.This issue is caused by only checking if the orientation is landscape or not:
DeviceKit/Source/Device.generated.swift
Lines 1869 to 1875 in 4b85958
I would expect an
.unknown
orientation variant. This can be a breaking change, however, I would say a minor version bump is fine because:switch
, the user doesn't care about other possible variants, and so this code won't affect themswitch
, Xcode will give a compiler error, and is a very quick fixThe text was updated successfully, but these errors were encountered: